Documentation / @super-line/client / backoffDelay
Function: backoffDelay()
backoffDelay(
attempt,opts):number
Defined in: packages/client/src/backoff.ts:19
Exponential backoff with full jitter: a random delay in [raw/2, raw], where raw = min(maxMs, baseMs * factor ** attempt). A pure function — easy to unit-test.
Parameters
attempt
number
0-based retry attempt.
opts
backoff tuning.
Returns
number
the delay in milliseconds before the next attempt.