June 2014
Intermediate to advanced
696 pages
38h 52m
English
A useful feature of Node.js and JavaScript is the ability to delay execution of code for a period of time. This can be useful for cleanup or refresh work that you do not want to always be running. You can implement three types of timers in Node.js: the timeout, interval, and immediate timers. The following sections describe each of these and how to implement them in your code.
Timeout timers are used to delay work for a specific amount of time. When that time expires, the callback function is executed, and the timer goes away. You should use timeouts for work that needs to be performed only once.
You create timeout timers by using the setTimeout(callback, delayMilliSeconds, [args]) method built ...
Read now
Unlock full access