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

Function clearTimeout

lib/timers.js:136–149  ·  view source on GitHub ↗

* Cancels a timeout. * @param {Timeout | string | number} timer * @returns {void}

(timer)

Source from the content-addressed store, hash-verified

134 * @returns {void}
135 */
136function clearTimeout(timer) {
137 if (timer?._onTimeout) {
138 timer._onTimeout = null;
139 unenroll(timer);
140 return;
141 }
142 if (typeof timer === 'number' || typeof timer === 'string') {
143 const timerInstance = knownTimersById[timer];
144 if (timerInstance !== undefined) {
145 timerInstance._onTimeout = null;
146 unenroll(timerInstance);
147 }
148 }
149}
150
151/**
152 * Schedules repeated execution of `callback`

Callers 15

net.jsFile · 0.70
internalConnectMultipleFunction · 0.70
afterConnectMultipleFunction · 0.70
clearIntervalFunction · 0.70
timers.jsFile · 0.70
exithandlerFunction · 0.70
spawnFunction · 0.70
setStreamTimeoutFunction · 0.50
finishMethod · 0.50
cleanupMethod · 0.50
stopTestFunction · 0.50
checkMethod · 0.50

Calls 1

unenrollFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…