| 40 | } |
| 41 | |
| 42 | PTime 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 |
no test coverage detected