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

Function TEST_CLASS

IntelPresentMon/UnitTests/Timing.cpp:26–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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.;

Callers

nothing calls this directly

Calls 2

AssertWithinToleranceFunction · 0.85
PeekMethod · 0.80

Tested by

no test coverage detected