4#include <emscripten/emscripten.h>
8 return emscripten_get_now();
14 clock_gettime(CLOCK_REALTIME, &t);
15 return (t.tv_sec * 1000000000) + t.tv_nsec;
22int64_t Cogs::perfTimeToMilliseconds(TimePerf time)
26double Cogs::perfTimeToSeconds(TimePerf time)
31int64_t Cogs::currentTimeToMicroseconds(Time time)
35int64_t Cogs::currentTimeToMilliseconds(Time time)
37 return time / 1000000;
39double Cogs::currentTimeToSeconds(Time time)
41 return time / 1000000000.0;
COGSFOUNDATION_API int64_t perfTimeToMicroseconds(TimePerf time)
Convertion functions for timestamps.
COGSFOUNDATION_API TimePerf perfTime()
High resolution performance timer. Returns an implementation defined absolute timestamp,...
COGSFOUNDATION_API Time currentTime()
High resolution clock time (NTP / UTC time). Returns an implementation defined absolute timestamp,...