pub fn fraction(out_time_us: u64, total_secs: f64) -> f64
Convert elapsed microseconds and total seconds into a clamped 0.0..=1.0 fraction.