Namespace node.timers
- Defined in: node.timers.js
Method Summary
Method Attributes | Method Name and Description |
---|---|
static |
node.timers.active(item)
|
static |
node.timers.clearInterval(timer)
Stops a interval from triggering.
|
static |
node.timers.clearTimeout(timer)
Prevents a timeout from triggering.
|
static |
node.timers.enroll(item, msecs)
|
static |
node.timers.setInterval(callback, repeat)
To schedule the repeated execution of
callback every delay milliseconds. |
static |
node.timers.setTimeout(callback, after)
To schedule execution of
callback after delay milliseconds. |
static |
node.timers.unenroll(item)
|
Method Detail
-
static node.timers.active(item)
- Parameters:
- {string} item
-
static node.timers.clearInterval(timer)Stops a interval from triggering.
- Parameters:
- {string} timer
-
static node.timers.clearTimeout(timer)Prevents a timeout from triggering.
- Parameters:
- {string} timer
-
static node.timers.enroll(item, msecs)
- Parameters:
- {string} item
- {string} msecs
-
static node.timers.setInterval(callback, repeat)To schedule the repeated execution of
callback
everydelay
milliseconds. Returns aintervalId
for possible use withclearInterval()
. Optionally, you can also pass arguments to the callback.- Parameters:
- {function(Error?|...[*]):undefined=} callback
- {string} repeat
-
static node.timers.setTimeout(callback, after)To schedule execution of
callback
afterdelay
milliseconds. Returns atimeoutId
for possible use withclearTimeout()
. Optionally, you can also pass arguments to the callback.- Parameters:
- {function(Error?|...[*]):undefined=} callback
- {string} after
-
static node.timers.unenroll(item)
- Parameters:
- {string} item