MCPcopy Create free account
hub / github.com/node-modules/utility / sleep

Function sleep

test/timeout.test.ts:5–9  ·  view source on GitHub ↗
(ms: number)

Source from the content-addressed store, hash-verified

3import { runWithTimeout, TimeoutError, promiseTimeout } from '../src/index.js';
4
5function sleep(ms: number) {
6 return new Promise(resolve => {
7 setTimeout(resolve, ms);
8 });
9}
10
11describe('test/timeout.test.ts', () => {
12 describe('runWithTimeout()', () => {

Callers 1

timeout.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…