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

Function clockPrecise

NULLC/includes/time.cpp:18–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16 }
17
18 double clockPrecise()
19 {
20#ifdef WIN32
21 LARGE_INTEGER freq, count;
22 QueryPerformanceFrequency(&freq);
23 QueryPerformanceCounter(&count);
24 double temp = double(count.QuadPart) / double(freq.QuadPart);
25 return temp*1000.0;
26#else
27 return ::clock() * 1000 / CLOCKS_PER_SEC;
28#endif
29 }
30}
31
32#define REGISTER_FUNC(funcPtr, name, index) if(!nullcBindModuleFunction("std.time", (void(*)())NULLCTime::funcPtr, name, index)) return false;

Callers

nothing calls this directly

Calls 1

clockFunction · 0.70

Tested by

no test coverage detected