formatDuration
fun formatDuration(totalSeconds: Long, labels: DurationUnitLabels, smallest: DurationUnit = DurationUnit.SECONDS): String(source)
Formats totalSeconds as its non-zero day, hour, minute and second parts, largest first: 1d 2h 3m 4s. Parts finer than smallest are dropped, and a duration with no part left prints zero of smallest. Negative input counts as zero.