macro_rules! sleep4 {
($s:expr) => { ... };
($s:expr, $ms:expr) => { ... };
($s:expr, $ms:expr, $us:expr) => { ... };
($s:expr, $ms:expr, $us:expr, $ns:expr) => { ... };
}
Available on crate feature
std
only.Expand description
A more compact Thread::sleep
.
Sleeps for $ns
seconds + $ms
milliseconds + $us
microseconds + $ns
nanoseconds
ยงExamples
sleep4![1, 0, 500]; // sleeps for 1 second + 500 microseconds