Function apply_jitter
fn apply_jitter(delay: Duration, jitter: f64, rng: &mut XorShift32) -> DurationAvailable on crate feature
tokio only.Expand description
Reduces delay by a random fraction up to jitter of its length.
jitter is in 0.0..=1.0 (guaranteed by the Jitter newtype). The factor
is then in (0, 1] and the result is never negative.