UNPKG

@nsnanocat/util

Version:

Pure JS's util module for well-known iOS network tools

11 lines (10 loc) 308 B
/** * 延时等待指定毫秒后继续执行。 * Wait for the given milliseconds before continuing. * * @param {number} [delay=1000] 延迟毫秒 / Delay in milliseconds. * @returns {Promise<void>} */ export function wait(delay = 1000) { return new Promise(resolve => setTimeout(resolve, delay)); }