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

Method SpinWaitUntil

IntelPresentMon/CommonUtilities/Qpc.cpp:99–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97 return performanceCounterPeriod_;
98 }
99 double QpcTimer::SpinWaitUntil(double seconds) const noexcept
100 {
101 double t = Peek();
102 for (; t < seconds; t = Peek()) {
103 std::this_thread::yield();
104 }
105 return t - seconds;
106 }
107 int64_t QpcTimer::TimeToTimestamp(double seconds) const noexcept
108 {
109 return startTimestamp_ + int64_t(seconds / performanceCounterPeriod_);

Callers 2

WaitWithBufferMethod · 0.80
TEST_METHODFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected