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

Method Trigger

IntelPresentMon/Core/source/infra/util/CooldownTimer.cpp:15–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 }
14
15 bool CooldownTimer::Trigger()
16 {
17 if (instances_.empty())
18 {
19 timer_.Mark();
20 instances_.push_back(0.f);
21 return false;
22 }
23
24 instances_.push_back(float(timer_.Peek()));
25
26 if (ThresholdExceeded())
27 {
28 // if we're above the threshold, run the update just in case
29 // there are stale entries and then check again to be sure
30 Update();
31 if (ThresholdExceeded())
32 {
33 return true;
34 }
35 }
36 return false;
37 }
38
39 bool CooldownTimer::ThresholdExceeded() const
40 {

Callers

nothing calls this directly

Calls 4

emptyMethod · 0.80
MarkMethod · 0.80
push_backMethod · 0.80
PeekMethod · 0.80

Tested by

no test coverage detected