MCPcopy Index your code
hub / github.com/simstudioai/sim / cleanupTimers

Function cleanupTimers

apps/sim/lib/execution/isolated-vm-worker.cjs:600–611  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

598 let nextTimerId = 1
599 const timers = new Map()
600 const cleanupTimers = () => {
601 for (const entry of timers.values()) {
602 try {
603 if (entry.recurring) clearInterval(entry.nodeTimer)
604 else clearTimeout(entry.nodeTimer)
605 } catch {}
606 try {
607 entry.fnRef.release()
608 } catch {}
609 }
610 timers.clear()
611 }
612
613 // Phase timings (ms). Populated inline during execution; returned in
614 // every result shape so the host can log where time is spent per request.

Callers 1

executeTaskFunction · 0.85

Calls 2

releaseMethod · 0.80
clearMethod · 0.65

Tested by

no test coverage detected