| 23 | static std::default_random_engine re(rd()); |
| 24 | |
| 25 | bool 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 | |
| 44 | void MacroConditionTimer::SetRandomTimeRemaining() |
| 45 | { |
nothing calls this directly
no test coverage detected