13 #include "../stdafx.h"
14 #include "../openttd.h"
18 #include "../safeguards.h"
23 if (this->period.period == std::chrono::milliseconds::zero())
return;
27 this->storage.elapsed += delta;
30 while (this->storage.elapsed >= this->period.period) {
31 this->storage.elapsed -= this->period.period;
36 this->callback(count);
43 if (this->fired)
return;
44 if (this->period.period == std::chrono::milliseconds::zero())
return;
48 this->storage.elapsed += delta;
50 if (this->storage.elapsed >= this->period.period) {
60 timer->Elapsed(delta);