Struct rotor_tools::Deadline [] [src]

pub struct Deadline(_);

A structure representing a moment in time.

SteadyTimes are generated by a "steady" clock, that is, a clock which never experiences discontinuous jumps and for which time always flows at the same rate.

Examples

Repeatedly call a function for 1 second:

let start = SteadyTime::now();

while SteadyTime::now() - start < Duration::seconds(1) {
    do_some_work();
}

Methods

impl SteadyTime

fn now() -> SteadyTime

Returns a SteadyTime representing the current moment in time.

Trait Implementations

impl Debug for SteadyTime

fn fmt(&self, __arg_0: &mut Formatter) -> Result<()Error>

impl Eq for SteadyTime

impl PartialEq<SteadyTime> for SteadyTime

fn eq(&self, __arg_0: &SteadyTime) -> bool

fn ne(&self, __arg_0: &SteadyTime) -> bool

impl Ord for SteadyTime

fn cmp(&self, __arg_0: &SteadyTime) -> Ordering

impl PartialOrd<SteadyTime> for SteadyTime

fn partial_cmp(&self, __arg_0: &SteadyTime) -> Option<Ordering>

fn lt(&self, __arg_0: &SteadyTime) -> bool

fn le(&self, __arg_0: &SteadyTime) -> bool

fn gt(&self, __arg_0: &SteadyTime) -> bool

fn ge(&self, __arg_0: &SteadyTime) -> bool

impl Copy for SteadyTime

impl Clone for SteadyTime

fn clone(&self) -> SteadyTime

impl Display for SteadyTime

fn fmt(&self, fmt: &mut Formatter) -> Result<()Error>

impl Sub<SteadyTime> for SteadyTime

type Output = Duration

fn sub(self, other: SteadyTime) -> Duration

impl Sub<Duration> for SteadyTime

type Output = SteadyTime

fn sub(self, other: Duration) -> SteadyTime

impl Add<Duration> for SteadyTime

type Output = SteadyTime

fn add(self, other: Duration) -> SteadyTime