# esleep **Repository Path**: w-8/esleep ## Basic Information - **Project Name**: esleep - **Description**: easy sleep - **Primary Language**: Rust - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-06-16 - **Last Updated**: 2023-06-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # esleep I can't stand doing this every time; If you want to sleep for 10 seconds; ~~~rust std::thread::sleep(std::time::Duration::from_secs(10)); ~~~ Now You just write; ~~~rust esleep::s(10); ~~~ ## Simple encapsulation and more ~~~rust pub fn s(var:u64){ std::thread::sleep(std::time::Duration::from_secs(var)); } pub fn ms(var:u64){ std::thread::sleep(std::time::Duration::from_millis(var)); } pub fn us(var:u64){ std::thread::sleep(std::time::Duration::from_micros(var)); } pub fn ns(var:u64){ std::thread::sleep(std::time::Duration::from_nanos(var)); } ~~~