• Pauses the execution for a specified number of milliseconds.

    Parameters

    • options: SleepOptions

      An object containing the sleep duration.

    Returns Promise<void>

    A promise that resolves after the specified duration.

    await sleep({ ms: 2000 });
    console.log("Waited for 2 seconds");