home ~ projects ~ socials

Sleep A Thread For A Time In Rust

use std::{thread, time};

fn main() {
    let sleep_time = time::Duration::from_millis(1000);
    println!("hello");
    thread::sleep(sleep_time);
    println!("sleep");
}

TODO: make a GIF showing the output

-- end of line --