Wraps a promise with a deadline, rejecting if the deadline is exceeded.
The async operation to time-box.
Maximum allowed duration in milliseconds.
Label used in the TimeoutError message.
The resolved value of the original promise if it completes in time.
Races a promise against a timeout, rejecting with TimeoutError if exceeded.