race MethodStatic
Utility function to wait for either the specified time or a promise, whichever resolves first
race<T>(ms: number, promise: PromiseLike<T>): Promise<void | T>
@returns Promise that resolves after the specified wait period or the provided promise resolves, whichever comes first
Parameter | Type | Description |
---|---|---|
ms | number | Maximum duration in milliseconds to wait |
promise | PromiseLike<T> | A pending promise to wait for |
Returns - Promise<void | T>
Promise that resolves after the specified wait period or the provided promise resolves, whichever comes first
Defined in
- core/bentley/src/Time.ts Line 53
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.