Trait TimeTrait

Source
pub trait TimeTrait: Copy {
    // Required methods
    fn now() -> Self;
    fn sub(&self, other: &Self) -> f64;
    fn supports_sleep() -> bool;
    fn sleep(seconds: f64);
}

Required Methods§

Source

fn now() -> Self

Source

fn sub(&self, other: &Self) -> f64

Source

fn supports_sleep() -> bool

Source

fn sleep(seconds: f64)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§