2019-05-15 14:52:37 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class CTimer
|
|
|
|
{
|
|
|
|
static uint32 &m_snTimeInMilliseconds;
|
|
|
|
static uint32 &m_snTimeInMillisecondsPauseMode;
|
|
|
|
static uint32 &m_snTimeInMillisecondsNonClipped;
|
|
|
|
static uint32 &m_snPreviousTimeInMilliseconds;
|
|
|
|
static uint32 &m_FrameCounter;
|
|
|
|
static float &ms_fTimeScale;
|
|
|
|
static float &ms_fTimeStep;
|
|
|
|
static float &ms_fTimeStepNonClipped;
|
|
|
|
static bool &m_UserPause;
|
|
|
|
static bool &m_CodePause;
|
|
|
|
public:
|
|
|
|
static float GetTimeStep(void) { return ms_fTimeStep; }
|
2019-06-12 18:07:37 +00:00
|
|
|
static float GetTimeStepNonClipped(void) { return ms_fTimeStepNonClipped; }
|
2019-05-19 19:28:10 +00:00
|
|
|
static void SetTimeStep(float ts) { ms_fTimeStep = ts; }
|
2019-05-15 14:52:37 +00:00
|
|
|
static uint32 GetFrameCounter(void) { return m_FrameCounter; }
|
|
|
|
static uint32 GetTimeInMilliseconds(void) { return m_snTimeInMilliseconds; }
|
2019-06-25 12:25:39 +00:00
|
|
|
static uint32 GetTimeInMillisecondsPauseMode(void) { return m_snTimeInMillisecondsPauseMode; }
|
|
|
|
|
2019-06-16 22:16:38 +00:00
|
|
|
static inline bool GetIsPaused() { return m_UserPause || m_CodePause; }
|
|
|
|
static inline bool GetIsUserPaused() { return m_UserPause; }
|
|
|
|
static inline void SetTimeScale(float ts) { ms_fTimeScale = ts; }
|
2019-05-29 18:02:58 +00:00
|
|
|
|
|
|
|
static void Initialise(void);
|
|
|
|
static void Shutdown(void);
|
|
|
|
static void Update(void);
|
|
|
|
static void Suspend(void);
|
|
|
|
static void Resume(void);
|
2019-06-16 22:16:38 +00:00
|
|
|
static uint32 GetCyclesPerMillisecond(void);
|
|
|
|
static uint32 GetCurrentTimeInCycles(void);
|
|
|
|
static bool GetIsSlowMotionActive(void);
|
2019-05-29 18:02:58 +00:00
|
|
|
static void Stop(void);
|
|
|
|
static void StartUserPause(void);
|
|
|
|
static void EndUserPause(void);
|
2019-05-15 14:52:37 +00:00
|
|
|
};
|