MCPcopy Create free account
hub / github.com/WheretIB/nullc / clock_precise

Function clock_precise

NULLC/translation/std_time_bind.cpp:15–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 return ::clock() * 1000 / CLOCKS_PER_SEC;
14}
15double clock_precise(void* unused)
16{
17#ifdef WIN32
18 LARGE_INTEGER freq, count;
19 QueryPerformanceFrequency(&freq);
20 QueryPerformanceCounter(&count);
21 double temp = double(count.QuadPart) / double(freq.QuadPart);
22 return temp*1000.0;
23#else
24 return ::clock() * 1000 / CLOCKS_PER_SEC;
25#endif
26}

Callers

nothing calls this directly

Calls 1

clockFunction · 0.70

Tested by

no test coverage detected