MCPcopy
hub / github.com/vercel/next.js / sleep

Function sleep

test/e2e/cancel-request/sleep.ts:1–3  ·  view source on GitHub ↗
(ms: number)

Source from the content-addressed store, hash-verified

1export function sleep(ms: number) {
2 return new Promise((res) => setTimeout(res, ms))
3}
4
5export class Deferred<T> {
6 declare promise: Promise<T>

Callers 3

readFunction · 0.90
primeFunction · 0.90
pullFunction · 0.90

Calls 1

setTimeoutFunction · 0.50

Tested by 1

primeFunction · 0.72