dev

This is the documentation page for Module:Docbunto/testcases/Function

Delay the execution of a function by t seconds.

Documentation

Package function

delay(fn, t) (function)
Delay the execution of a function by t seconds.
Parameters:
fn The function to execute after the delay. (function)
t The delay in seconds before executing the function. (number)
Returns: Function that will execute delay~fn after t seconds - handle. (function)

Other items

handle() (function)
Function handle generated by delay.
Errors:
'Expected function for argument #1' (line 28)
'Expected number for argument #2' (line 31)
Returns: Nothing. (nil)

Notes

See also

https://github.com/rxi/tick/blob/master/tick.lua