|
OpenTTD Source
14.0-beta3
|
Go to the documentation of this file.
13 #include "../stdafx.h"
17 #include "../safeguards.h"
24 if (this->
period == 0)
return;
29 while (this->
storage.elapsed >= this->period) {
35 this->callback(count);
42 if (this->fired)
return;
43 if (this->period == 0)
return;
45 this->storage.elapsed += delta;
47 if (this->storage.elapsed >= this->period) {
59 timer->Elapsed(delta);
static TickCounter counter
Monotonic counter, in ticks, since start of game.
TPeriod period
The period of the timer.
uint64_t TickCounter
The type that the tick counter is stored in.
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 bool Elapsed(TElapsed value)
Called when time for this timer elapsed.
TStorage storage
The storage of the timer.