Module: libs/common/util/sleep
Functions
sleep
▸ Const
sleep<T
>(delay?
, value?
, options?
): Promise
<T
>
Sleep function that returns a promise that resolves when the sleep is complete.
WARNING: Please do not use this function in tests, because we retry our tests on failure, and this function will sleep the same amount of time every time the test is retried. Prefer sleepWithBackoff instead.
Type parameters
Name | Type |
---|---|
T | void |
Parameters
Name | Type |
---|---|
delay? | number |
value? | T |
options? | TimerOptions |
Returns
Promise
<T
>
Defined in
libs/common/util/sleep.ts:11