The promise to race against a timeout.
Optionaltime: numberThe number of seconds to wait. If undefined, the promise is returned without wrapping.
The message to set in the TimeoutError.
The error origin. (default: ErrorOrigin.INTERNAL)
The error level (default: ErrorLevel.FATAL)
Races a promise with a timeout, rejecting with a TimeoutError if the timeout is reached before the provided promise.