Skip to main content

countdown_until_program_ends

Function countdown_until_program_ends 

Source
pub fn countdown_until_program_ends(seconds_spent_running: u32, duration: u32)
Expand description

Every second the timer ticks once If the timer hits our countdown, we exit the program. This function prints the countdown to let the user know the program is still running.