fn format_seconds(seconds: u64) -> String {
    let mut time_till_reboot = if seconds / 60 >= 1 {
        format!(
            "{} minute{}{}",
            seconds / 60,
            if seconds / 60 == 1 { "" } else { "s" },
            if seconds % 60 > 0 { " and " } else { "" }
        )
    } else {
        String::from("")
    };
    if seconds % 60 > 0 {
        time_till_reboot.push_str(&format!(
            "{} second{}",
            seconds % 60,
            if seconds % 60 == 1 { "" } else { "s" }
        ))
    }

    time_till_reboot
}
/// Helper to return a human-friendly version of seconds.
/// Example: 65 seconds would be converted to 1 minute and 5 seconds.
Helper to return a human-friendly version of seconds.
Example: 65 seconds would be converted to 1 minute and 5 seconds.
Helper to return a human - friendly version of seconds . Example : 65 seconds would be converted to 1 minute and 5 seconds .
fn format_seconds(seconds: u64) -> String {
    let mut time_till_reboot = if seconds / 60 >= 1 {
        format!(
            "{} minute{}{}",
            seconds / 60,
            if seconds / 60 == 1 { "" } else { "s" },
            if seconds % 60 > 0 { " and " } else { "" }
        )
    } else {
        String::from("")
    };
    if seconds % 60 > 0 {
        time_till_reboot.push_str(&format!(
            "{} second{}",
            seconds % 60,
            if seconds % 60 == 1 { "" } else { "s" }
        ))
    }
    time_till_reboot
}
fn format_seconds ( seconds : u64 ) -> String { let mut time_till_reboot = if seconds / 60 >= 1 { format ! ( " " seconds 60 if seconds 60 1 { " " } else { " " } if seconds 60 0 { " " } else { " " } ) } else { String :: from ( " " ) } ; if seconds % 60 > 0 { time_till_reboot . push_str ( & format ! ( " " seconds 60 if seconds 60 1 { " " } else { " " } ) ) } time_till_reboot }
Helper to return a human-friendly version of seconds.
Helper to return a human - friendly version of seconds .
seconds
u64