Skip to main content

pretty

Function pretty 

Source
pub fn pretty(d: Duration) -> String
Expand description

Formats a duration with one plural human-readable unit.

The unit and scale component come from whole_and_frac. Output has the form {whole}.{scaled} {unit}, where scaled is the component multiplied by 100, truncated to an integer, and emitted without zero padding.