aboutsummaryrefslogtreecommitdiff
path: root/system/include/emscripten.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-05-14 16:49:25 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-05-14 16:49:25 -0700
commit354a88d763284fae92a59d311f8562542ad10a97 (patch)
treeb0eb1e9777246c6ad002c896753b5082ef249fc4 /system/include/emscripten.h
parentfaf13f78df6aba1f4eddcca1f0778eaa878e1495 (diff)
emscripten_get_now
Diffstat (limited to 'system/include/emscripten.h')
-rw-r--r--system/include/emscripten.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/system/include/emscripten.h b/system/include/emscripten.h
index a4f15868..d0e6cc46 100644
--- a/system/include/emscripten.h
+++ b/system/include/emscripten.h
@@ -65,6 +65,15 @@ void emscripten_async_call(void (*func)(), int millis) {
void emscripten_hide_mouse();
/*
+ * Returns the highest-precision representation of the
+ * current time that the browser provides. This uses either
+ * Date.now or performance.now. The result is *not* an
+ * absolute time, and is only meaningful in comparison to
+ * other calls to this function. The unit is ms.
+ */
+float emscripten_get_now();
+
+/*
* This macro-looking function will cause Emscripten to
* generate a comment in the generated code.
* XXX This is deprecated for now, because it requires us to