10 #ifndef TIMER_GAME_REALTIME_H
11 #define TIMER_GAME_REALTIME_H
37 std::chrono::milliseconds period;
40 TPeriod(std::chrono::milliseconds period,
PeriodFlags flag) : period(period), flag(flag) {}
42 bool operator < (
const TPeriod &other)
const
44 if (this->flag != other.flag)
return this->flag < other.flag;
45 return this->period < other.period;
48 bool operator == (
const TPeriod &other)
const
50 return this->flag == other.flag && this->period == other.period;
53 using TElapsed = std::chrono::milliseconds;
55 std::chrono::milliseconds elapsed;
Timer that represents real time for game-related purposes.
@ UNPAUSED
Only run when not paused.
@ ALWAYS
Always run, even when paused.
@ AUTOSAVE
Only run when not paused or there was a Command executed recently.