rumtk_sleep

Macro rumtk_sleep 

Source
macro_rules! rumtk_sleep {
    ( $dur:expr) => { ... };
}
Expand description

Sleep a duration of time in a sync context, so no await can be call on the result.

You can pass any value that can be cast to f32.

The precision is up to nanoseconds and it is depicted by the number of decimal places.

ยงExamples

    use rumtk_core::rumtk_sleep;
    rumtk_sleep!(1);           // Sleeps for 1 second.
    rumtk_sleep!(0.001);       // Sleeps for 1 millisecond
    rumtk_sleep!(0.000001);    // Sleeps for 1 microsecond
    rumtk_sleep!(0.000000001); // Sleeps for 1 nanosecond