//! Progress-line helpers for the stderr tile counter: h/m/s durations. /// Format a duration in seconds as h/m/s (`1h23m45s`, `23m10s`, `45s`). pub fn fmt_hms(secs: f64) -> String { let total = secs.max(0.0).round() as u64; let h = total / 3600; let m = (total % 3600) / 60; let s = total % 60; if h > 0 { format!("{h}h{m:02}m{s:02}s") } else if m > 0 { format!("{m}m{s:02}s") } else { format!("{s}s") } }