13 #include "../stdafx.h"
17 #include "../safeguards.h"
24 if (this->
period.value == 0)
return;
29 while (this->
storage.elapsed >= this->period.value) {
35 this->callback(count);
42 if (this->fired)
return;
43 if (this->period.value == 0)
return;
45 this->storage.elapsed += delta;
47 if (this->storage.elapsed >= this->period.value) {
59 timer->Elapsed(delta);
69 if (period.priority == TimerGameTick::Priority::NONE)
return;
76 assert(timer->period.priority != period.priority);
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.
void Elapsed(TElapsed count) override
Called by the timer manager to notify the timer that the given amount of time has elapsed.
uint64_t TickCounter
The type that the tick counter is stored in.
static TickCounter counter
Monotonic counter, in ticks, since start of game.
The TimerManager manages a single Timer-type.
static bool Elapsed(TElapsed value)
Called when time for this timer elapsed.
Definition of Interval and OneShot timers.
Definition of the tick-based game-timer.