MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / now

Function now

test/pthread/test_pthread_reltime.cpp:13–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include <emscripten.h>
12
13static long now() {
14 struct timespec time;
15 clock_gettime(CLOCK_MONOTONIC, &time);
16 return time.tv_sec * 1000 + time.tv_nsec / 1000 / 1000;
17}
18
19static long ping, pong;
20

Callers 12

thread_mainFunction · 0.85
notifyFunction · 0.85
sleep_untilFunction · 0.85
nowMethod · 0.85
nowMethod · 0.85
nowMethod · 0.85
wait_untilFunction · 0.85
wait_forFunction · 0.85
wait_forMethod · 0.85
__do_timed_waitMethod · 0.85

Calls 1

clock_gettimeFunction · 0.50

Tested by

no test coverage detected