Reject if the given promise does not resolve within the given timeout.
Time complexity: O(1)
Space complexity: O(1)
The promise to wait for
The timeout in milliseconds
The resolved value of the promise
Promise
Reject if the given promise does not resolve within the given timeout.
Time complexity: O(1)
Space complexity: O(1)