11#ifndef TIMER_MANAGER_H
12#define TIMER_MANAGER_H
16template <
typename TTimerType>
26template <
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 void UnregisterTimer(BaseTimer< TTimerType > &timer)
Unregister a timer.
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.
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.