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

  1. number the current FPS
sleep(time)Source

waits for a set ammount of time (allows sub .05s timings)

Parameters

  1. 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

  1. number epoch time in seconds
get_average_delta()Source

returns the average frametime

Returns

  1. number average frametime delta
get_delta()Source

returns the momentary frametime

Returns

  1. number frametime delta
step()Source

internal function. used for updating delta time. gets called between every frame.

Returns

  1. number last_delta the last read frame time delta value