class
Time
Manages global time related functionality.
Public
Constructors
Time
Methods
~Time
GetRealTimeInSeconds
Gets the time elapsed since application start.
Only gets updated once per frame.
Returns: The time since application start, in seconds. This is real time, unaffected by simulation time scale.
GetRealTimeInMilliseconds
Gets the time elapsed since application start.
Only gets updated once per frame.
Returns: The time since application start, in miliseconds. This is real time, unaffected by simulation time scale.
GetFrameDelta
Gets the time since last frame was executed.
Only gets updated once per frame.
Returns: Time since last frame was executed, in seconds.
GetLastFrameTime
Returns the time (in seconds) the latest frame has started.
GetCurrentFrameIndex
Returns the sequential index of the current frame.
First frame is 0.
Returns: The current frame.
GetTimePrecise
Returns the precise time since application start, in microseconds.
Unlike other time methods this is not only updated every frame, but will return exact time at the moment it is called.
Returns: Time in microseconds.
GetStartTimeMs
Gets the time at which the application was started, counting from system start.
Returns: The time since system to application start, in milliseconds.
GetCurrentDateTimeString
Gets the current date and time in textual form.
- isUTC
- Outputs the date and time in Coordinated Universal Time, otherwise in local time.
Returns: A String containing the current date and time.
GetCurrentTimeString
Gets the current time in textual form
- isUTC
- Outputs the time in Coordinated Universal Time, otherwise in local time.
Returns: A String containing the current time.
GetAppStartUpDateString
Gets the date and time where the application has been started in textual form.
- isUTC
- Outputs the date and time in Coordinated Universal Time, otherwise in local time.
Returns: A String containing the application startup date and time.
SetFixedDeltaTime
Sets a fixed delta time for deterministic simulation.
When enabled, GetFrameDelta() returns this constant value regardless of real-time elapsed.
- deltaSeconds
- Fixed time step in seconds (e.g., 0.016666 for 60 FPS). 0 disables.
GetFixedDeltaTimeUs
Returns the fixed delta time in microseconds, or 0 if using real-time.
staticInstance
Returns a reference to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticInstancePtr
Returns a pointer to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticShutDown
Shuts down this module and frees any resources it is using.
staticIsStarted
Query if the module has been started.
Internal
Methods
Protected
Methods
~Module<T>
OnStartUp
Override if you want your module to be notified once it has been constructed and started.
OnShutDown
Override if you want your module to be notified just before it is deleted.
staticInstanceInternal
Returns a singleton instance of this module.
Private
Fields
mFrameDelta
Frame delta in seconds
mTimeSinceStartMs
mFirstFrame
mFixedDeltaTimeMicrosec
Fixed delta time in microseconds (0 = disabled, use real-time)