UNPKG

lib-curses

Version:

Simple node.js library for work with console

10 lines (9 loc) 377 B
/** * Pauses execution for a specified amount of time. * * @param {number} milliseconds - Amount of time to wait in milliseconds. * @returns {Promise<void>} A promise that resolves after specified time has passed. */ export async function wait(milliseconds: number): Promise<void> { return new Promise((resolve) => setTimeout(() => resolve(), milliseconds)); }