Skip to main content

exponential_backoff_remaining

Function exponential_backoff_remaining 

Source
pub fn exponential_backoff_remaining(
    min: Duration,
    max: Duration,
    elapsed: Duration,
    tries: u32,
) -> Option<Duration>
Expand description

Calculates the remaining exponential-backoff hold.

The window grows quadratically with the retry count and is capped at max. None means the hold has elapsed.