Struct time::SteadyTime [−][src]
pub struct SteadyTime(_);
A structure representing a moment in time.
SteadyTime
s 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(); }
Implementations
impl SteadyTime
[src]
impl SteadyTime
[src]pub fn now() -> SteadyTime
[src]
Returns a SteadyTime
representing the current moment in time.
Trait Implementations
impl Add<Duration> for SteadyTime
[src]
impl Add<Duration> for SteadyTime
[src]type Output = SteadyTime
The resulting type after applying the +
operator.
fn add(self, other: Duration) -> SteadyTime
[src]
impl Clone for SteadyTime
[src]
impl Clone for SteadyTime
[src]fn clone(&self) -> SteadyTime
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Ord for SteadyTime
[src]
impl Ord for SteadyTime
[src]impl PartialEq<SteadyTime> for SteadyTime
[src]
impl PartialEq<SteadyTime> for SteadyTime
[src]fn eq(&self, other: &SteadyTime) -> bool
[src]
fn ne(&self, other: &SteadyTime) -> bool
[src]
impl PartialOrd<SteadyTime> for SteadyTime
[src]
impl PartialOrd<SteadyTime> for SteadyTime
[src]impl Sub<Duration> for SteadyTime
[src]
impl Sub<Duration> for SteadyTime
[src]type Output = SteadyTime
The resulting type after applying the -
operator.
fn sub(self, other: Duration) -> SteadyTime
[src]
impl Sub<SteadyTime> for SteadyTime
[src]
impl Sub<SteadyTime> for SteadyTime
[src]