17#include "../safeguards.h"
22 if (this->period == std::chrono::milliseconds::zero())
return;
24 this->storage.elapsed += delta;
27 while (this->storage.elapsed >= this->period) {
28 this->storage.elapsed -= this->period;
33 this->callback(count);
40 if (this->fired)
return;
41 if (this->period == std::chrono::milliseconds::zero())
return;
43 this->storage.elapsed += delta;
45 if (this->storage.elapsed >= this->period) {
57 for (
auto timer : timers) {
58 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.
Definition of Interval and OneShot timers.
Definition of the Window system.