-
Notifications
You must be signed in to change notification settings - Fork 103
Timer
The Timer class provides basic timing and seeking functions. A Timer is provided by the CubicVR.MainLoop loop function callback.
Purpose:
Start the timer and initialize time to 0.
Returns:
none
Purpose:
Update the timer for the current frame and step the timer. This will be called automatically by MainLoop.
Returns:
none
Purpose:
Stop the timer and mark the end_time property.
Returns:
none
Purpose:
Start the timer and reset time to 0.
Returns:
none
Purpose:
Force time intervals to f_rate frames per second regardless of actual time.
Parameters:
- f_rate - Frames per second.
Returns:
none
Purpose:
Disable any calls to lockFramerate(..)
.
Returns:
none
Purpose:
Checks if the timer is locked or not.
Returns:
true
if framerate is locked, false
if not.
Purpose:
Get the current time in Milliseconds.
Returns:
Time in Milliseconds
Purpose:
Get the current time in Seconds.
Returns:
Time in Seconds.
Purpose:
Set the current time in Milliseconds.
Parameters:
- milliseconds - Millseconds to set the time to.
Returns:
none
Purpose:
Set the current time in Seconds.
Parameters:
- seconds - Seconds to set the time to.
Returns:
none
Purpose:
Return the time interval between this update and last in Seconds.
Returns:
Time interval betwen update() in Seconds.
Purpose:
Return the time interval between this update and last in Milliseconds.
Returns:
Time interval betwen update() in Milliseconds
Purpose:
Get the total time (excluding pauses and time shifts).
Returns:
Total time in Milliseconds.
Purpose:
Get the total time (excluding pauses and time shifts).
Returns:
Total time in Seconds
Purpose:
Get the total number of calls to update().
Returns:
Total number of calls to update()
.
Purpose:
Set the paused state of the timer. While paused the timer will continue to run but maintain the current time.
Parameters:
paused - true
or false
to pause or unpause, respectively.
Returns:
none
Purpose:
Return the paused state of the timer.
Returns:
true
if paused, false
if not.