MCPcopy Create free account
hub / github.com/denoland/std / nextDueNode

Function nextDueNode

testing/time.ts:234–242  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

232}
233
234function nextDueNode(): DueNode | null {
235 for (;;) {
236 const dueNode = dueTree.min();
237 if (!dueNode) return null;
238 const hasTimer = dueNode.timers.some((timer) => dueNodes.has(timer.id));
239 if (hasTimer) return dueNode;
240 dueTree.remove(dueNode);
241 }
242}
243
244let startedAt: number;
245let now: number;

Callers 1

nextMethod · 0.85

Calls 3

minMethod · 0.80
hasMethod · 0.65
removeMethod · 0.45

Tested by

no test coverage detected