19 if (this->period == std::chrono::milliseconds::zero())
return;
21 this->storage.elapsed += delta;
24 while (this->storage.elapsed >= this->period) {
25 this->storage.elapsed -= this->period;
30 this->callback(count);
37 if (this->fired)
return;
38 if (this->period == std::chrono::milliseconds::zero())
return;
40 this->storage.elapsed += delta;
42 if (this->storage.elapsed >= this->period) {
54 for (
auto timer : timers) {
55 timer->Elapsed(delta);
void Elapsed(TElapsed count) override
Called by the timer manager to notify the timer that the given amount of time has elapsed.
void Elapsed(TElapsed count) override
Called by the timer manager to notify the timer that the given amount of time has elapsed.
The TimerManager manages a single Timer-type.
static std::set< BaseTimer< TTimerType > *, base_timer_sorter > & GetTimers()
Singleton list, to store all the active timers.
static bool Elapsed(TElapsed value)
Called when time for this timer elapsed.
A number of safeguards to prevent using unsafe methods.
Definition of base types and functions in a cross-platform compatible way.
Definition of Interval and OneShot timers.
Definition of the Window system.