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

Function trackTimer

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

Source from the content-addressed store, hash-verified

103
104function trackTimer(timer: ReturnType<typeof setTimeout>): ReturnType<typeof setTimeout> {
105 pendingTimers.add(timer);
106 timer.unref?.(); // Don't prevent process exit
107 return timer;
108}
109
110function clearTrackedTimer(timer: ReturnType<typeof setTimeout>): void {
111 clearTimeout(timer);
112 pendingTimers.delete(timer);

Callers 1

editMethod · 0.70

Calls 1

addMethod · 0.45

Tested by

no test coverage detected