[][src]Struct timekeeper::Timer

pub struct Timer<T: Tracker, S: Source> { /* fields omitted */ }

Methods

impl<T: Tracker, S: Source> Timer<T, S>[src]

pub fn new() -> Self[src]

Create a new Timer.

pub fn start(&mut self)[src]

Start timing. Panics if the timer is already running.

pub fn stop(&mut self)[src]

Stop timing. Panics if the timer is not currently running.

pub fn is_running(&self) -> bool[src]

Returns whether the timer is currently running.

pub fn get_stats(&self) -> T::Statistics[src]

pub fn num_nanoseconds(&self) -> u64[src]

Returns the elapsed time in nanoseconds.

pub fn num_microseconds(&self) -> u64[src]

Returns the elapsed time in microseconds.

pub fn num_milliseconds(&self) -> u64[src]

Return the elapsed time in milliseconds.

pub fn num_seconds(&self) -> u64[src]

Returns the elapsed time in seconds.

pub fn num_minutes(&self) -> u64[src]

Returns the elapsed time in minutes.

pub fn num_hours(&self) -> u64[src]

Returns the elapsed time in hours.

Auto Trait Implementations

impl<T, S> Unpin for Timer<T, S> where
    S: Unpin,
    T: Unpin

impl<T, S> Sync for Timer<T, S> where
    S: Sync,
    T: Sync

impl<T, S> Send for Timer<T, S> where
    S: Send,
    T: Send

impl<T, S> RefUnwindSafe for Timer<T, S> where
    S: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, S> UnwindSafe for Timer<T, S> where
    S: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

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

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

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.

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

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

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