Skip to content

delay() function

与えられた wait 時間だけ値を遅延させます。

Signature:

typescript
declare function delay(wait: number): Promise<void>;

Example

ts
await delay(1000);
console.log("hello"); // after 1000 milliseconds log hello

Open Source Code

Released under the Apache-2.0 License.