MCPcopy
hub / github.com/nodejs/undici / setTimeout

Function setTimeout

lib/util/timers.js:338–344  ·  view source on GitHub ↗

* The setTimeout() method sets a timer which executes a function once the * timer expires. * @param {Function} callback A function to be executed after the timer * expires. * @param {number} delay The time, in milliseconds that the timer should * wait before the specified function or

(callback, delay, arg)

Source from the content-addressed store, hash-verified

336 * @returns {NodeJS.Timeout|FastTimer}
337 */
338 setTimeout (callback, delay, arg) {
339 // If the delay is less than or equal to the RESOLUTION_MS value return a
340 // native Node.js Timer instance.
341 return delay <= RESOLUTION_MS
342 ? setTimeout(callback, delay, arg)
343 : new FastTimer(callback, delay, arg)
344 },
345 /**
346 * The clearTimeout method cancels an instantiated Timer previously created
347 * by calling setTimeout.

Callers 15

setTimeoutMethod · 0.85
setHttp2IdleTimeoutFunction · 0.85
mockDispatchFunction · 0.85
#scheduleFlushMethod · 0.85
#reconnectMethod · 0.85
refreshTimeoutFunction · 0.85
issue-4880.jsFile · 0.85
http2-goaway.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…