wait

@buff-beacon-project/curby-clientDocs


@buff-beacon-project/curby-client / wait

Function: wait()

wait(dt, signal?): Promise<unknown>

Wait a specified number of milliseconds

Parameters

Parameter
Type
Description

dt

number

The number of milliseconds to wait

signal?

AbortSignal

An optional abort signal

Returns

Promise<unknown>

A promise that resolves after the specified time

Throws

If the signal is aborted

Example

await wait(1000)
console.log('One second has passed')

Defined in

src/timing.ts:44

Last updated