backoff_with_full_jitter

Function backoff_with_full_jitter 

Source
pub fn backoff_with_full_jitter(
    base_ms: u64,
    cap_ms: u64,
    retry: u32,
    rand: u64,
) -> Duration
Expand description

Full-jitter sleep duration for retry number retry (1 = the first retry): a uniform draw in [0, nominal_backoff_ms(base, cap, retry)] (AWS “Exponential Backoff and Jitter” full jitter). Pure in rand so tests can pin bounds; the production draw is jitter_delay.