Function tor_circmgr::timeouts::mul_duration_f64_saturating

source ·
fn mul_duration_f64_saturating(d: Duration, mul: f64) -> Duration
Expand description

A safe variant of Duration::mul_f64 that never panics.

For infinite or NaN or negative multipliers, the results might be nonsensical, but at least they won’t be a panic.