MCPcopy Index your code
hub / github.com/nodejs/node / setInterval

Function setInterval

lib/timers.js:159–164  ·  view source on GitHub ↗

* Schedules repeated execution of `callback` * every `repeat` milliseconds. * @param {Function} callback * @param {number} [repeat] * @param {...any} [args] * @returns {Timeout}

(callback, repeat, ...args)

Source from the content-addressed store, hash-verified

157 * @returns {Timeout}
158 */
159function setInterval(callback, repeat, ...args) {
160 validateFunction(callback, 'callback');
161 const timeout = new Timeout(callback, repeat, args.length ? args : undefined, true, true);
162 insert(timeout, timeout._idleTimeout);
163 return timeout;
164}
165
166/**
167 * Cancels an interval.

Calls 1

insertFunction · 0.85

Tested by 1

testFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…