Skip to main content

PlatformSleep

Trait PlatformSleep 

Source
pub trait PlatformSleep {
    // Required methods
    fn sleep_us(us: usize);
    fn sleep_ms(ms: usize);
    fn sleep_s(s: usize);
}
Expand description

Sleep primitives.

On bare-metal with smoltcp, implementations should poll the network stack during busy-wait sleep to avoid missing packets.

Required Methods§

Source

fn sleep_us(us: usize)

Sleep for the given number of microseconds.

Source

fn sleep_ms(ms: usize)

Sleep for the given number of milliseconds.

Source

fn sleep_s(s: usize)

Sleep for the given number of seconds.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§