Function: nextAttemptDelay()
function nextAttemptDelay(
attempt,
policy,
rand?
): number;
Defined in: backoff.ts:39
Milliseconds to wait before attempt attempt + 1. rand is injectable so
tests can pin the jitter; it is expected to return [0, 1) like
Math.random, and out-of-range values are clamped rather than trusted.
Parameters
| Parameter | Type | Default value |
|---|---|---|
attempt | number | undefined |
policy | BackoffPolicy | undefined |
rand | RandomSource | Math.random |
Returns
number