Trait concurrency_traits::TimeFunctions[][src]

pub trait TimeFunctions {
    type InstantType: Add<Duration, Output = Self::InstantType> + AddAssign<Duration> + Sub<Duration, Output = Self::InstantType> + SubAssign<Duration> + Sub<Self::InstantType, Output = Duration> + Ord + Copy;
    fn current_time() -> Self::InstantType;
}
Expand description

Functions to interact with system time.

Associated Types

type InstantType: Add<Duration, Output = Self::InstantType> + AddAssign<Duration> + Sub<Duration, Output = Self::InstantType> + SubAssign<Duration> + Sub<Self::InstantType, Output = Duration> + Ord + Copy[src]

The type of an instant for this system. Analog for std::time::Instant.

Required methods

fn current_time() -> Self::InstantType[src]

Get the current instant. Analog for std::time::Instant::now.

Implementors