/** * Manually sleep which basically stop the execution. * @param {number} timeoutMs The number of milliseconds to wait. * @returns {Promise} */ export default function msleep(timeoutMs: number): Promise { return new Promise((resolve) => { const t = setTimeout(() => { clearTimeout(t); resolve(); }, timeoutMs); }); }