[][src]Struct eggtimer::Timer

pub struct Timer { /* fields omitted */ }

A simple timer that knows how long since it started

Implementations

impl Timer[src]

pub fn start() -> Timer[src]

Creates a new Timer

pub fn reset(&mut self)[src]

Restarts the Timer

pub fn elapsed(self) -> f64[src]

Gets the elapsed time as a floating-point number of seconds

pub fn duration(self) -> Duration[src]

Get the elapsed time as a Duration

pub fn started_at(self) -> Instant[src]

Gets the Instant at which the Timer was started

Trait Implementations

impl Clone for Timer[src]

impl Copy for Timer[src]

impl Debug for Timer[src]

impl Default for Timer[src]

impl Eq for Timer[src]

impl Hash for Timer[src]

impl Ord for Timer[src]

impl PartialEq<Timer> for Timer[src]

impl PartialOrd<Timer> for Timer[src]

impl StructuralEq for Timer[src]

impl StructuralPartialEq for Timer[src]

Auto Trait Implementations

impl RefUnwindSafe for Timer

impl Send for Timer

impl Sync for Timer

impl Unpin for Timer

impl UnwindSafe for Timer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.