| 42 | } |
| 43 | |
| 44 | void MacroConditionTimer::SetRandomTimeRemaining() |
| 45 | { |
| 46 | double min, max; |
| 47 | if (_duration.Seconds() <= _duration2.Seconds()) { |
| 48 | min = _duration.Seconds(); |
| 49 | max = _duration2.Seconds(); |
| 50 | } else { |
| 51 | min = _duration2.Seconds(); |
| 52 | max = _duration.Seconds(); |
| 53 | } |
| 54 | std::uniform_real_distribution<double> unif(min, max); |
| 55 | |
| 56 | double remainingTime = unif(re); |
| 57 | _duration.SetTimeRemaining(remainingTime); |
| 58 | } |
| 59 | |
| 60 | bool MacroConditionTimer::Save(obs_data_t *obj) const |
| 61 | { |
nothing calls this directly
no test coverage detected