| 37 | } |
| 38 | } |
| 39 | TEST_METHOD(QpcTimerMarkPeekSleep) |
| 40 | { |
| 41 | const auto periodMs = 1000. / 60.; |
| 42 | const auto sleepPeriodMs = periodMs * 5; |
| 43 | util::QpcTimer timer; |
| 44 | for (int i = 0; i < 4; i++) { |
| 45 | timer.Mark(); |
| 46 | Sleep(DWORD(sleepPeriodMs)); |
| 47 | AssertWithinTolerance(timer.Peek() * 1000., sleepPeriodMs, periodMs); |
| 48 | } |
| 49 | } |
| 50 | TEST_METHOD(QpcTimerMarkPeekChrono) |
| 51 | { |
| 52 | using Timer = std::chrono::high_resolution_clock; |
nothing calls this directly
no test coverage detected