MCPcopy
hub / github.com/coder/mux / sleep

Function sleep

src/node/runtime/coderLifecycleHooks.ts:19–25  ·  view source on GitHub ↗
(ms: number)

Source from the content-addressed store, hash-verified

17const DEFAULT_STOPPING_POLL_INTERVAL_MS = 1_000;
18
19function sleep(ms: number): Promise<void> {
20 if (ms <= 0) {
21 return Promise.resolve();
22 }
23
24 return new Promise((resolve) => setTimeout(resolve, ms));
25}
26
27function isAlreadyStoppedOrGone(status: WorkspaceStatusResult): boolean {
28 if (status.kind === "not_found") {

Callers 3

createCoderUnarchiveHookFunction · 0.70
acquireConnectionMethod · 0.70
acquireConnectionMethod · 0.70

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected