Browse Source

Use DUK_USE_GET_MONOTONIC_TIME when available

pull/1659/head
Sami Vaarala 7 years ago
parent
commit
26b09707f4
  1. 4
      src-input/duk_api_time.c

4
src-input/duk_api_time.c

@ -9,7 +9,11 @@ DUK_INTERNAL duk_double_t duk_time_get_ecmascript_time(duk_hthread *thr) {
} }
DUK_INTERNAL duk_double_t duk_time_get_monotonic_time(duk_hthread *thr) { DUK_INTERNAL duk_double_t duk_time_get_monotonic_time(duk_hthread *thr) {
#if defined(DUK_USE_GET_MONOTONIC_TIME)
return (duk_double_t) DUK_USE_GET_MONOTONIC_TIME(thr);
#else
return (duk_double_t) DUK_USE_DATE_GET_NOW(thr); return (duk_double_t) DUK_USE_DATE_GET_NOW(thr);
#endif
} }
DUK_EXTERNAL duk_double_t duk_get_now(duk_hthread *thr) { DUK_EXTERNAL duk_double_t duk_get_now(duk_hthread *thr) {

Loading…
Cancel
Save