Skip to main content

split_timer_duration

Function split_timer_duration 

Source
pub fn split_timer_duration(
    total_seconds: u64,
    units: &[TimerUnit],
) -> TimerParts
Expand description

Splits whole seconds into the requested units.

The largest requested unit absorbs any larger amount (36 hours stay 36 hours when days are not shown); the smallest requested unit truncates the rest.