timer
timer
¶
Frame timing and the clock.
getTime ¶
proc getTime(): float
getDelta ¶
proc getDelta(nim2d: Nim2d): float
Seconds elapsed between the previous two frames.
Parameters
-
nim2d(Nim2d)
Returns
float
Source:
src/nim2d/timer.nim:10
getFPS ¶
proc getFPS(nim2d: Nim2d): float
The current frames per second, from the last frame's timing.
Parameters
-
nim2d(Nim2d)
Returns
float
Source:
src/nim2d/timer.nim:14
sleep ¶
proc sleep(seconds: float)
Pause the calling thread for a number of seconds.
Parameters
-
seconds(float)
Source:
src/nim2d/timer.nim:18
Generated with mkdocstrings-nim