MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / sleep

Function sleep

dev/local/runner.ts:71–73  ·  view source on GitHub ↗
(ms: number)

Source from the content-addressed store, hash-verified

69
70export async function waitForPort(port: number, name: string, maxWaitMs: number): Promise<void> {
71 const start = Date.now();
72 while (Date.now() - start < maxWaitMs) {
73 if (await probePort(port)) return;
74 await sleep(500);
75 }
76 console.warn(`⚠ ${name} on port ${port} did not become ready within ${maxWaitMs / 1000}s`);

Callers 2

waitForPortFunction · 0.70
waitForEnvValueChangeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected