[−][src]Struct timekeeper::Timer
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,
S: Unpin,
T: Unpin,
impl<T, S> Sync for Timer<T, S> where
S: Sync,
T: Sync,
S: Sync,
T: Sync,
impl<T, S> Send for Timer<T, S> where
S: Send,
T: Send,
S: Send,
T: Send,
impl<T, S> RefUnwindSafe for Timer<T, S> where
S: RefUnwindSafe,
T: RefUnwindSafe,
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> UnwindSafe for Timer<T, S> where
S: UnwindSafe,
T: UnwindSafe,
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]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,