MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / CheckCondition

Method CheckCondition

plugins/base/macro-condition-timer.cpp:25–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23static std::default_random_engine re(rd());
24
25bool MacroConditionTimer::CheckCondition()
26{
27 if (_paused) {
28 SetVariables(_remaining);
29 return _remaining == 0.;
30 }
31 SetVariables(_duration.TimeRemaining());
32 if (_duration.DurationReached()) {
33 if (!_oneshot) {
34 _duration.Reset();
35 if (_type == TimerType::RANDOM) {
36 SetRandomTimeRemaining();
37 }
38 }
39 return true;
40 }
41 return false;
42}
43
44void MacroConditionTimer::SetRandomTimeRemaining()
45{

Callers

nothing calls this directly

Calls 3

TimeRemainingMethod · 0.80
DurationReachedMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected