| 26 | UTIL_time_t UTIL_getTime(void) { UTIL_time_t x; QueryPerformanceCounter(&x); return x; } |
| 27 | |
| 28 | PTime 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 | |
| 42 | PTime UTIL_getSpanTimeNano(UTIL_time_t clockStart, UTIL_time_t clockEnd) |
| 43 | { |
no test coverage detected