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

Function UTIL_getSpanTimeNano

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

Source from the content-addressed store, hash-verified

40}
41
42PTime UTIL_getSpanTimeNano(UTIL_time_t clockStart, UTIL_time_t clockEnd)
43{
44 static LARGE_INTEGER ticksPerSecond;
45 static int init = 0;
46 if (!init) {
47 if (!QueryPerformanceFrequency(&ticksPerSecond)) {
48 perror("timefn::QueryPerformanceFrequency");
49 abort();
50 }
51 init = 1;
52 }
53 return 1000000000ULL*(clockEnd.QuadPart - clockStart.QuadPart)/ticksPerSecond.QuadPart;
54}
55
56
57

Callers 2

UTIL_clockSpanNanoFunction · 0.85
UTIL_waitForNextTickFunction · 0.85

Calls 2

abortClass · 0.85
UTIL_getSpanTimeFunction · 0.85

Tested by

no test coverage detected