Crates.io | snor |
lib.rs | snor |
version | 0.1.1 |
source | src |
created_at | 2022-03-05 07:01:42.65639 |
updated_at | 2022-03-05 07:38:49.815458 |
description | Wrapper to standard library sleep functionality. |
homepage | |
repository | https://github.com/marshblocker/snor |
max_upload_size | |
id | 543891 |
size | 4,205 |
Wrapper to standard library sleep functionality.
I find myself always needing the sleep functionality given by the standard library, but I always need to search how it works, so I made this to make my life easier (not that it contributes much).
In Cargo.toml
:
[dependencies]
snor = "0.1.1"
Used in a crate as:
use snor;
// Sleep for 10 seconds.
snor::sleep_sec(10);
// Sleep for 100 milliseconds.
snor::sleep_ms(100);
// Sleep for 1000 microseconds.
snor::sleep_micros(1000);
//Sleep for 10000 nanoseconds.
snor::sleep_nanos(10000);