c3d.timer
a bunch of FPS and time related things
getFPS() | returns the current FPS |
---|---|
sleep(time) | waits for a set ammount of time (allows sub . |
get_time() | returns current epoch time in seconds with ns precision on CraftOS pc |
get_average_delta() | returns the average frametime |
get_delta() | returns the momentary frametime |
step() | internal function. |
- getFPS()Source
returns the current FPS
Returns
- number the current FPS
- sleep(time)Source
waits for a set ammount of time (allows sub .05s timings)
Parameters
- time number the amount of time to wait in seconds
- get_time()Source
returns current epoch time in seconds with ns precision on CraftOS pc
Returns
- number epoch time in seconds
- get_average_delta()Source
returns the average frametime
Returns
- number average frametime delta
- get_delta()Source
returns the momentary frametime
Returns
- number frametime delta
- step()Source
internal function. used for updating delta time. gets called between every frame.
Returns
- number last_delta the last read frame time delta value