fuc-new/doc/node_modules/@vuepress/helper/lib/client/utils/wait.js
hellcat 6adbc04d4b 1
2025-10-03 17:17:08 +08:00

13 lines
315 B
JavaScript

/**
* Wait for a given time
*
* 等待指定时间
*
* @param ms - Wait time in milliseconds / 等待时间(毫秒)
*
* @returns A promise that resolves after the given time / 在指定时间后解析的 Promise
*/
export const wait = (ms) => new Promise((resolve) => {
setTimeout(resolve, ms);
});