13 #include "../stdafx.h"
17 #include "../safeguards.h"
22 if (this->
period == std::chrono::milliseconds::zero())
return;
27 while (this->
storage.elapsed >= this->period) {
33 this->callback(count);
40 if (this->
fired)
return;
41 if (this->
period == std::chrono::milliseconds::zero())
return;
45 if (this->
storage.elapsed >= this->period) {
57 for (
auto timer : timers) {
58 timer->Elapsed(delta);
TStorage storage
The storage of the timer.
TPeriod period
The period of the timer.
void Elapsed(TElapsed count) override
Called by the timer manager to notify the timer that the given amount of time has elapsed.
bool fired
Whether the timeout has occurred.
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.