MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / clearTrackedTimer

Function clearTrackedTimer

im/im.ts:111–114  ·  view source on GitHub ↗
(timer: ReturnType<typeof setTimeout>)

Source from the content-addressed store, hash-verified

109// ==================== Timer tracking for safe cleanup ====================
110const pendingTimers = new Set<ReturnType<typeof setTimeout>>();
111
112function trackTimer(timer: ReturnType<typeof setTimeout>): ReturnType<typeof setTimeout> {
113 pendingTimers.add(timer);
114 timer.unref?.(); // Don't prevent process exit
115 return timer;
116}
117

Callers 1

editMethod · 0.70

Calls 1

deleteMethod · 0.45

Tested by

no test coverage detected