Hex Core JS
    Preparing search index...

    Function sleep

    • Stops execution for the given number of miliseconds. If provided, the callback is called after the timeout. Note: the callback is really just for testing purposes, but can be used instead of awaiting.

      Parameters

      • ms: number

        The number of miliseconds for which to sleep.

      • Optionaldone: () => void

        A callback function to call after the timeout.

      Returns Promise<void>