instance method Function#delay
Function#delay(seconds[, args...]) → Number
-
seconds
(Number
) – How long to wait before calling the function.
Schedules the function to run after the specified amount of time, passing any arguments given.
Behaves much like window.setTimeout
. Returns an integer ID that can be
used to clear the timeout with window.clearTimeout
before it runs.
To schedule a function to run as soon as the interpreter is idle, use
Function#defer
.