BeDuration Class
A duration of time. Can be either positive (towards future) or negative (in the past). BeDurations are immutable.
Methods
Name | Description | |
---|---|---|
executeAfter<T>(fn: (...args: any[]) => T, scope?: any, ...args: any[]): Promise<T> | Execute a function after delaying by this duration. | |
minus(other: BeDuration): BeDuration | Subtract a BeDuration from this BeDuration, returning a new BeDuration. | |
plus(other: BeDuration): BeDuration | Add a BeDuration to this BeDuration, returning a new BeDuration | |
wait(): Promise<void> | Utility function to just wait for the specified time | |
fromMilliseconds(milliseconds: number): BeDuration Static | Create a BeDuration from milliseconds. | |
fromSeconds(seconds: number): BeDuration Static | Create a BeDuration from seconds. | |
race<T>(ms: number, promise: PromiseLike<T>): Promise<void | T> Static | Utility function to wait for either the specified time or a promise, whichever resolves first | |
wait(ms: number): Promise<void> Static | Utility function to just wait for the specified time |
Properties
Defined in
- core/bentley/src/Time.ts Line 13
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.