Module ringo/scheduler
This module provides support for scheduling invocation of
functions.
Cancel a timeout previuosly scheduled with setInterval().
Parameters
| object |
id |
the id object returned by setInterval() |
See
Cancel a timeout previuosly scheduled with setTimeout().
Parameters
| object |
id |
the id object returned by setTimeout() |
See
setInterval
(callback, delay, args)
Calls a function repeatedly, with a fixed time delay between each call to
that function. The function will be called in the thread of the local event
loop. This means it will only run after the currently executing code and
other code running before it have terminated.
Parameters
| function |
callback |
a function |
| number |
delay |
the delay in milliseconds |
| ... |
args |
optional arguments to pass to the function |
Returns
| object |
an id object useful for cancelling the scheduled invocation |
setTimeout
(callback, delay, [args])
Executes a function after specified delay. The function will be called
in the thread of the local event loop. This means it will only run after
the currently executing code and other code running before it have
terminated.
Parameters
| function |
callback |
a function |
| number |
delay |
the delay in milliseconds |
| ... |
[args] |
optional arguments to pass to the function |
Returns
| object |
an id object useful for cancelling the scheduled
invocation |