Interface to the Timer System. More...
#include
Public Types | |
enum | ETimer { ETIMER_GAME = 0, ETIMER_UI, ETIMER_LAST } |
enum | ETimeScaleChannels { eTSC_Trackview = 0, eTSC_GameStart } |
Public Member Functions | |
virtual void | ResetTimer ()=0 |
virtual void | UpdateOnFrameStart ()=0 |
Updates the timer every frame, needs to be called by the system. | |
virtual float | GetCurrTime (ETimer which=ETIMER_GAME) const =0 |
Returns the absolute time at the last UpdateOnFrameStart() call. | |
virtual const CTimeValue & | GetFrameStartTime (ETimer which=ETIMER_GAME) const =0 |
Returns the absolute time at the last UpdateOnFrameStart() call. | |
virtual CTimeValue | GetAsyncTime () const =0 |
virtual float | GetAsyncCurTime ()=0 |
Returns the absolute current time at the moment of the call. | |
virtual float | GetReplicationTime () const =0 |
Returns sum of relative time passed at each frame. | |
virtual float | GetFrameTime (ETimer which=ETIMER_GAME) const =0 |
Returns the relative time passed from the last UpdateOnFrameStart() in seconds. | |
virtual float | GetRealFrameTime () const =0 |
Returns the relative time passed from the last UpdateOnFrameStart() in seconds without any dilation, smoothing, clamping, etc... | |
virtual float | GetTimeScale () const =0 |
Returns the time scale applied to time values. | |
virtual float | GetTimeScale (uint32 channel) const =0 |
Returns the time scale factor for the given channel. | |
virtual void | ClearTimeScales ()=0 |
Clears all current time scale requests. | |
virtual void | SetTimeScale (float s, uint32 channel=0)=0 |
Sets the time scale applied to time values. | |
virtual void | EnableTimer (const bool bEnable)=0 |
Enables/disables timer. | |
virtual bool | IsTimerEnabled () const =0 |
virtual float | GetFrameRate ()=0 |
Returns the current framerate in frames/second. | |
virtual float | GetProfileFrameBlending (float *pfBlendTime=0, int *piBlendMode=0)=0 |
Returns the fraction to blend current frame in profiling stats. | |
virtual void | Serialize (TSerialize ser)=0 |
Serialization. | |
virtual bool | PauseTimer (ETimer which, bool bPause)=0 |
virtual bool | IsTimerPaused (ETimer which)=0 |
virtual bool | SetTimer (ETimer which, float timeInSeconds)=0 |
virtual void | SecondsToDateUTC (time_t time, struct tm &outDateUTC)=0 |
virtual time_t | DateToSecondsUTC (struct tm &timePtr)=0 |
virtual void | SetFixedFrameTime (float time) |
virtual float | TicksToSeconds (int64 ticks) const =0 |
Convert from ticks (CryGetTicks()) to seconds. | |
virtual int64 | GetTicksPerSecond ()=0 |
Get number of ticks per second. | |
virtual ITimer * | CreateNewTimer ()=0 |
Create a new timer of the same type. | |
Interface to the Timer System.
enum ITimer::ETimer |
|
pure virtual |
Makes a UTC time from a tm. Example: Like timegm, but not available on all platforms.
|
pure virtual |
Returns the absolute current time.
|
pure virtual |
|
pure virtual |
Determines if a timer is paused.
|
pure virtual |
Tries to pause/unpause a timer.
|
pure virtual |
Resets the timer
|
pure virtual |
Makes a tm struct from a time_t in UTC Example: Like gmtime.
|
pure virtual |
Tries to set a timer.