MCPcopy
hub / github.com/simstudioai/sim / sleep

Function sleep

packages/utils/src/helpers.ts:5–7  ·  view source on GitHub ↗
(ms: number)

Source from the content-addressed store, hash-verified

3 * Replaces the common `new Promise(resolve => setTimeout(resolve, ms))` pattern.
4 */
5export function sleep(ms: number): Promise<void> {
6 return new Promise((resolve) => setTimeout(resolve, ms))
7}
8
9/** No-operation function for use as default callback. */
10export const noop = () => {}

Callers 15

sendWithRetryFunction · 0.90
flushFunction · 0.90
runFunction · 0.90
connectWithRetryFunction · 0.90
acquireMigrationLockFunction · 0.90
runMigrationsWithRetryFunction · 0.90
index.test.tsFile · 0.90
executeWithRetryFunction · 0.90
executeToolRequestFunction · 0.90
run_actor_async.tsFile · 0.90
discover.tsFile · 0.90
extract.tsFile · 0.90

Calls

no outgoing calls

Tested by 3

flushFunction · 0.72
fnFunction · 0.72