MCPcopy Create free account
hub / github.com/F-Stack/f-stack / UTIL_getSpanTimeMicro

Function UTIL_getSpanTimeMicro

freebsd/contrib/zstd/programs/timefn.c:28–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26UTIL_time_t UTIL_getTime(void) { UTIL_time_t x; QueryPerformanceCounter(&x); return x; }
27
28PTime UTIL_getSpanTimeMicro(UTIL_time_t clockStart, UTIL_time_t clockEnd)
29{
30 static LARGE_INTEGER ticksPerSecond;
31 static int init = 0;
32 if (!init) {
33 if (!QueryPerformanceFrequency(&ticksPerSecond)) {
34 perror("timefn::QueryPerformanceFrequency");
35 abort();
36 }
37 init = 1;
38 }
39 return 1000000ULL*(clockEnd.QuadPart - clockStart.QuadPart)/ticksPerSecond.QuadPart;
40}
41
42PTime UTIL_getSpanTimeNano(UTIL_time_t clockStart, UTIL_time_t clockEnd)
43{

Callers 1

UTIL_clockSpanMicroFunction · 0.85

Calls 2

abortClass · 0.85
UTIL_getSpanTimeFunction · 0.85

Tested by

no test coverage detected