Google News
logo
NodeJS - Interview Questions
List and explain the timing features of Node.js.
A timer module containing multiple functions for the execution of the code after a specific time period is provided by Node.js. Some of the functions provided in this module are:
 
process.nextTick : This function schedules a callback function which is required to be invoked in the next iteration of the event loop

setTimeout/clearTimeout : This function schedules code execution after the assigned amount of time (in milliseconds)

setImmediate/clearImmediate : This functions executes code at the conclusion of the existing event loop cycle

setInterval/clearInterval : This function is used to execute a block of code a number of times
Advertisement