Timers
setImmediate()
Schedules a callback in the check phase, after poll in the event-loop model.
Formal Syntax & Structure
nodejs syntaxnodejs
setImmediate(callback[, ...args])Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| callback | Function | Function to run. |
| args | any | Callback arguments. |
Return Value
Immediate
Handle usable with clearImmediate.
Working Example
Example Snippetnodejs
setImmediate(console.log,'later'); console.log('now');