| 35 | #ifdef _WIN32 |
| 36 | |
| 37 | timer_d timer() |
| 38 | { |
| 39 | static bool init(false); |
| 40 | static LARGE_INTEGER freq; |
| 41 | |
| 42 | if (!init) { |
| 43 | QueryPerformanceFrequency(&freq); |
| 44 | init = true; |
| 45 | } |
| 46 | |
| 47 | LARGE_INTEGER count; |
| 48 | QueryPerformanceCounter(&count); |
| 49 | |
| 50 | return static_cast<double>(count.QuadPart) / freq.QuadPart; |
| 51 | } |
| 52 | |
| 53 | |
| 54 | uint lowResTimer() |