Wraps a promise with a timeout. Rejects with a timeout error if the promise does not resolve within the specified duration.
The promise to wrap
Timeout in milliseconds
Name of the operation for error messaging
The result of the promise
Error if the operation times out
Wraps a promise with a timeout. Rejects with a timeout error if the promise does not resolve within the specified duration.