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

Function main

test/pthread/test_pthread_clock_drift.c:49–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49int main()
50{
51 // Cause a one second delay between main() and pthread start that might have a
52 // chance to drift the wallclocks on emscripten_get_now().
53 busy_sleep(1000);
54
55 pthread_t thread;
56 pthread_create(&thread, NULL, thread_main, NULL);
57 wait(&threadStarted);
58 mainThreadTime = emscripten_get_now();
59 wake(&timeReceived);
60
61 emscripten_exit_with_live_runtime();
62}

Callers

nothing calls this directly

Calls 4

busy_sleepFunction · 0.85
wakeFunction · 0.85
waitFunction · 0.70
emscripten_get_nowFunction · 0.50

Tested by

no test coverage detected