11 #ifndef TIMER_MANAGER_H
12 #define TIMER_MANAGER_H
14 #include "../stdafx.h"
16 template <
typename TTimerType>
26 template <
typename TTimerType>
29 using TPeriod =
typename TTimerType::TPeriod;
30 using TElapsed =
typename TTimerType::TElapsed;
85 static void Validate(TPeriod period);
The base where every other type of timer is derived from.
TPeriod period
The period of the timer.
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 void UnregisterTimer(BaseTimer< TTimerType > &timer)
Unregister a timer.
static bool Elapsed(TElapsed value)
Called when time for this timer elapsed.
static void RegisterTimer(BaseTimer< TTimerType > &timer)
Register a timer.
static void ChangeRegisteredTimerPeriod(BaseTimer< TTimerType > &timer, TPeriod new_period)
Change the period of a registered timer.