Skip to main content

humanize_duration_compact

Function humanize_duration_compact 

Source
pub fn humanize_duration_compact(seconds: u64) -> String
Expand description

Format a duration in seconds as a compact human-readable unit.

Returns "42s", "5m", "3h", or "2d". Callers add their own suffix (" ago", "expires in ...") so the same core serves past and future durations. Do not fork this ladder per crate.