MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / schedule

Function schedule

src/core/process-lifecycle.ts:89–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87 let timer: NodeJS.Timeout | null = null;
88
89 const schedule = (): void => {
90 if (timer) clearTimeout(timer);
91 timer = setTimeout(() => {
92 timer = null;
93 if (options.isTransportAlive && options.isTransportAlive()) {
94 schedule();
95 return;
96 }
97 options.onIdle();
98 }, options.timeoutMs);
99 unrefHandle(timer);
100 };
101
102 schedule();
103

Callers 1

createIdleMonitorFunction · 0.70

Calls 1

unrefHandleFunction · 0.85

Tested by

no test coverage detected