• Returns a promise that will reject after the provided number of seconds. If the optional abort signal is aborted, the timer will be canceled and the promise resolved. This is the inverse of sleep

    Parameters

    • time: number

      The number of seconds to wait.

    • Optionalabort: ReadonlyAbort

      If provided, when aborted (regardless of reason) will resolve the returned promise.

    • message: string = 'Timed out after {0}s'

      The message to be used in the TimeoutError in case of timeout.

    Returns Promise<void>