Skip to main content

Sleeper

Trait Sleeper 

Source
pub trait Sleeper: Send + Sync {
    // Required method
    fn sleep_for(&self, duration: Duration);
}
Expand description

Provides blocking relative sleep operations.

Required Methods§

Source

fn sleep_for(&self, duration: Duration)

Blocks the current thread for the specified duration.

§Arguments
  • duration - The relative duration to sleep.

Implementors§