31 [[nodiscard]]
float GetTimestep()
const {
return m_Timestep; }
36 [[nodiscard]] uint16_t
GetTickRate()
const {
return m_Tickrate; }
89 void SetTickrateUpdateFunc(
const std::function<
void(GameTimer&)>& func) { m_TickrateUpdateFunc = func; }
92 double m_DeltaTime{ 0 };
93 double m_TickAlpha{ 0 };
95 float m_Timestep{ 0 };
96 double m_Accumulator{ 0 };
101 bool m_ManualStep{
false };
102 bool m_ManualTickGate{
false };
104 uint64_t m_LastTime{ 0 };
106 uint16_t m_Tickrate{ 0 };
108 std::function<void(GameTimer&)> m_TickrateUpdateFunc{
nullptr };
128 [[nodiscard]]
double End()
const;
130 uint64_t m_Start{ 0 };
double GetElapsedMilliseconds() const
Gets the time in milliseconds since application start.
void SetTickrate(const uint16_t tickrate)
Changes the tickrate.
double GetElapsedHours() const
Gets the time in hours since application start.
double GetElapsedMinutes() const
Gets the time in minutes since application start.
double GetTickAlpha() const
Returns the tickAlpha, scale is in seconds. Used for between tick interpolation.
double GetDeltaTime() const
Returns the deltaTime, scale is in seconds.
static std::string FormatTime_S_to_M_S_MS(const double seconds)
Formats seconds into a string with a format Min:Sec:Ms.
float GetTimestep() const
Returns the current timeStep, scale is in seconds.
void SetManualTickStep(const bool state)
Enables or disables manual tick step.
uint16_t GetTickRate() const
Returns the current tickRate.
static std::string FormatTime_MS_to_M_S_MS(const double milliseconds)
Formats milliseconds into a string with a format Min:Sec:Ms.
double GetElapsedSeconds() const
Gets the time in seconds since application start.
double End() const
Stops the manual timer.
void Start()
Start the manual timer.
Core systems of the engine are here.