pub fn fmt_duration(duration: Duration) -> StringExpand description
Formats a Duration into a user-friendly format using days, hours, minutes, and seconds,
and returns the formatted string.
Durations less than one minute include fractional seconds with nanosecond precision (up to 9 decimal places), while durations of one minute or longer display as whole seconds, rounded to the nearest second.
The output format includes the following components:
{days}dfor days{hours}hfor hours{minutes}mfor minutes{seconds}sfor seconds
When all components are non-zero, the format appears as:
{days}d {hours}h {minutes}m {seconds}s