| 64 | //----------------------------------------------------------------------------- |
| 65 | |
| 66 | CpuTimer::CpuTimer() : |
| 67 | Timer() |
| 68 | { |
| 69 | LARGE_INTEGER freq; |
| 70 | QueryPerformanceFrequency( &freq ); |
| 71 | m_freq = static_cast<double>(freq.QuadPart); |
| 72 | |
| 73 | #if USE_RDTSC |
| 74 | const double calibrationTime = 0.1; |
| 75 | |
| 76 | LONGLONG start, stop; |
| 77 | start = rdtsc_time(); |
| 78 | Delay(calibrationTime); |
| 79 | stop = rdtsc_time(); |
| 80 | |
| 81 | m_freqRdtsc = static_cast<double>(stop - start) / calibrationTime; |
| 82 | #endif |
| 83 | } |
| 84 | |
| 85 | CpuTimer::~CpuTimer() |
| 86 | { |
nothing calls this directly
no test coverage detected