use std::{thread, time}; fn main() { let mut seconds = 10; while seconds > 0 { println!("Time left: {} seconds", seconds); seconds -= 1; thread::sleep(time::Duration::from_secs(1)); } println!("Time's up!"); }