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

Function lifecycleDelay

zpr/zpr.ts:60–67  ·  view source on GitHub ↗
(ms: number, label: string)

Source from the content-addressed store, hash-verified

58 if (lifecycle) {
59 await lifecycle.delay(ms, { label });
60 return;
61 }
62 await new Promise(resolve => setTimeout(resolve, ms));
63}
64
65function scheduleAbort(controller: AbortController, ms: number, label: string): () => void {
66 const lifecycle = tryGetCurrentGenerationContext();
67 if (lifecycle) {
68 const handle = lifecycle.setTimeout(() => controller.abort(), ms, { label });
69 return () => clearTimeout(handle);
70 }

Callers 1

writeConfigWithRetryMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected