Timer¶
The Timer library is used to schedule timers.
Usage¶
Lua | |
---|---|
Functions¶
start¶
timer.start( ms )
Start a timer of n
milliseconds.
Note
Timer is bound to tickrate, therefore it will emit to the closest tick.
Parameters¶
ms
: number - Milliseconds to wait
Returns¶
timerId
: integer - ID of the timer just scheduled.
Emits¶
sleep¶
timer.sleep( n )
Extension
This function is an extension implemented by CapyOS!
Wait n
milliseconds.
Parameters¶
n
: number - Milliseconds to wait.
Throws¶
- If
n
is less than 1.
Last update:
March 11, 2023
Created: March 11, 2023
Created: March 11, 2023