truncatedTo

Returns this duration, rounded down to match the precision of a given unit.

fun truncatedTo(unit: TimeUnit): Duration