Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Sleep A Thread For A Time In Rust

rust
#!/usr/bin/env cargo +nightly -Zscript

//! ```cargo
//! [package]
//! edition = "2021"
//! [dependencies]
//! ```

use std::{thread, time};

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