MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / TEST_METHOD

Function TEST_METHOD

IntelPresentMon/UnitTests/Timing.cpp:39–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 5

AssertWithinToleranceFunction · 0.85
MarkMethod · 0.80
PeekMethod · 0.80
SpinWaitUntilMethod · 0.80
WaitMethod · 0.45

Tested by

no test coverage detected