Duration
duration
Short human rendering of millisecond durations.
Canonical stdlib-only formatter so a duration like 1500 renders uniformly
as '1.5s' across AXM surfaces, instead of drifting between '1500ms'
and datetime.timedelta's '0:00:01.500000'.
format_duration(millis)
Render a millisecond duration as a short human string.
450 → '450ms', 1500 → '1.5s', 90000 → '1.5min',
5400000 → '1.5h'. Bands round to at most one decimal (rounded,
not truncated). Negative, non-numeric or non-finite input returns
'n/a' without raising.