LuaDocs/TimerManager

From Data Realms Wiki

Jump to: navigation, search

Contents

Has no parent class

Generic Class. The centralized singleton manager of all Timer:s and overall timekeeping in RTE.

Go back to Class Index


Properties

TicksPerSecond

Read-only property. The number of ticks per second, or the resolution.The number of ticks per second.

TimeScale

A time scale factor which will be used to speed up or slow down the progress of the simulation time in relation to the real world time.A factor between the real world time, and the simulation time. A value of 2.0 means simulation runs twice as fast as normal.

RealToSimCap

The cap of the amount of seconds which can be transferred from the real time to the simulated time in one update.A float describing the current cap in seconds.

DeltaTimeTicks

Returns the current number of ticks that the of the simulation updates in.The current fixed delta time that the simulation should be updating with, in ticks.

DeltaTimeSecs

Returns the current fixed delta time of the simulation updates, in seconds.The current fixed delta time that the simulation should be updating with, in seconds.

DeltaTimeMS

Read-only property. Returns the current fixed delta time of the simulation updates, in ms.The current fixed delta time that the simulation should be updating with, in ms.

OneSimUpdatePerFrame

Shows whether to force this to artifically make time for only one single sim update for the graphics frame. Useful for debugging or profiling.Whether the sim should be set to only update once per graphics frame or not.


Functions

EnableAveraging

Enables or disables the averaging of time measurements done each Update(). These help smooth out and prevent choppy animation.

Arguments:

  • Whether ot not to enable the averaging.

Return value:

None.


PauseSim

Sets the sim to be paused, ie no real time ticks will be transferred to the sim accumulator while this is set to true;

Arguments:

  • Whether the sim should be paused or not.

Return value:

None.


TimeForSimUpdate

Tells whether there is enough sim time accumulated to do at least one physics update.

Arguments:

  • None.

Return value:

Whetehr there is enough sim time to do a physics update.


DrawnSimUpdate

Tells whether the current simulation update will be drawn in a frame. Use this to check if it is necessary to draw purely graphical things during the sim update.

Arguments:

  • None.

Return value:

Whether this is the last sim update before a frame with its results will appear.


Go back to Class Index

Personal tools