sdk.watcher.randomwait
Home > @matterway/sdk > Watcher > randomWait
Watcher.randomWait() function
Waits for a random amount of time.
Signature:
export declare function randomWait<T>(duration?: number): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
duration | number | (Optional) Minimum amount of time to wait, in ms. |
Returns:
Promise<void>
Remarks
Will wait a random amount between base, and twice the base duration.
Example
await randomWait();