Skip to main content

exponential_backoff_secs

Function exponential_backoff_secs 

Source
pub fn exponential_backoff_secs(
    base_secs: i64,
    max_secs: i64,
    attempt: i32,
) -> i64
Expand description

base_secs * 2^attempt, capped at max_secs. attempt is clamped to keep the shift in range of i64.