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

Function processTimers

lib/internal/timers.js:526–544  ·  view source on GitHub ↗
(now)

Source from the content-addressed store, hash-verified

524
525
526 function processTimers(now) {
527 debug('process timer lists %d', now);
528 nextExpiry = Infinity;
529
530 let list;
531 let ranAtLeastOneList = false;
532 while ((list = timerListQueue.peek()) != null) {
533 if (list.expiry > now) {
534 nextExpiry = list.expiry;
535 return timeoutInfo[0] > 0 ? nextExpiry : -nextExpiry;
536 }
537 if (ranAtLeastOneList)
538 runNextTicks();
539 else
540 ranAtLeastOneList = true;
541 listOnTimeout(list, now);
542 }
543 return 0;
544 }
545
546 function listOnTimeout(list, now) {
547 const msecs = list.msecs;

Callers

nothing calls this directly

Calls 4

runNextTicksFunction · 0.85
listOnTimeoutFunction · 0.85
debugFunction · 0.50
peekMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…