忘れるのでメモ
定義
const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms))
使用
await sleep(<duration>)
出典
https://stackoverflow.com/questions/951021/what-is-the-javascript-version-of-sleep
Go to list of users who liked
More than 1 year has passed since last update.
忘れるのでメモ
定義
const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms))
使用
await sleep(<duration>)
出典
https://stackoverflow.com/questions/951021/what-is-the-javascript-version-of-sleep
Register as a new user and use Qiita more conveniently
Go to list of users who liked