roundToNearestSecond

fun Duration.roundToNearestSecond(): Duration

Returns a duration rounded the nearest second.