| 24 | } |
| 25 | |
| 26 | TEST_CLASS(TestTiming) |
| 27 | { |
| 28 | public: |
| 29 | TEST_METHOD(QpcTimerPeekCumulativeSleep) |
| 30 | { |
| 31 | const auto periodMs = 1000. / 60.; |
| 32 | const auto sleepPeriodMs = periodMs * 5; |
| 33 | util::QpcTimer timer; |
| 34 | for (int i = 0; i < 4; i++) { |
| 35 | Sleep(DWORD(sleepPeriodMs)); |
| 36 | AssertWithinTolerance(timer.Peek() * 1000., sleepPeriodMs * (i+1), periodMs * (i+1)); |
| 37 | } |
| 38 | } |
| 39 | TEST_METHOD(QpcTimerMarkPeekSleep) |
| 40 | { |
| 41 | const auto periodMs = 1000. / 60.; |
nothing calls this directly
no test coverage detected