#include <TimerManager.hh>
Manages the race timer to create lap splits and final times.
Definition at line 93 of file TimerManager.hh.
Public Member Functions | |
| void | init () |
| void | calc () |
Getters | |
| Timer | currentTimer () const |
| Computes the current race timer. | |
| u32 | frameCounter () const |
| Retrieves the number of frames the timer has been updated since the race started. | |
Setters | |
| void | setStarted (bool isSet) |
Static Private Member Functions | |
| static constexpr u32 | CalcTotalMs (u32 frame) |
| Converts a frame counter value to the total number of elapsed milliseconds. | |
| static constexpr u16 | CalcMinutes (u32 totalMs) |
| Converts a total number of elapsed milliseconds to whole minutes. | |
Private Attributes | |
| bool | m_started |
| Indicates whether the race has started. | |
| u32 | m_frameCounter |
| The number of frames since the race started. | |
Static Private Attributes | |
| static constexpr f32 | REFRESH_PERIOD = 1000.0f / 59.94f |
| static constexpr f32 | MILLISECONDS_TO_MINUTES = 1.0f / 60000.0f |
| static constexpr f32 | MILLISECONDS_TO_SECONDS = 1.0f / 1000.0f |
| static constexpr f32 | SECONDS_TO_MILLISECONDS = 1000.0f |
| static constexpr f32 | MINUTES_TO_MILLISECONDS = 60000.0f |
|
Inlined in 0x805327A0 |
Definition at line 23 of file TimerManager.cc.
|
default0x805376E0 |
|
0x80535904 |
Definition at line 39 of file TimerManager.cc.
|
inlinestaticnodiscardconstexprprivate |
Converts a total number of elapsed milliseconds to whole minutes.
Definition at line 146 of file TimerManager.hh.
|
inlinestaticnodiscardconstexprprivate |
Converts a frame counter value to the total number of elapsed milliseconds.
Definition at line 141 of file TimerManager.hh.
|
inlinenodiscard |
Computes the current race timer.
Definition at line 105 of file TimerManager.hh.
|
inlinenodiscard |
Retrieves the number of frames the timer has been updated since the race started.
currentTimer() reflects frame m_frameCounter - 1, or zero if no frames have elapsed.
Definition at line 121 of file TimerManager.hh.
|
0x80535864 |
Definition at line 31 of file TimerManager.cc.
|
inline |
Definition at line 128 of file TimerManager.hh.
|
private |
The number of frames since the race started.
Definition at line 151 of file TimerManager.hh.
|
private |
Indicates whether the race has started.
Definition at line 150 of file TimerManager.hh.
|
staticconstexprprivate |
Definition at line 135 of file TimerManager.hh.
|
staticconstexprprivate |
Definition at line 136 of file TimerManager.hh.
|
staticconstexprprivate |
Definition at line 138 of file TimerManager.hh.
|
staticconstexprprivate |
Definition at line 134 of file TimerManager.hh.
|
staticconstexprprivate |
Definition at line 137 of file TimerManager.hh.