[−][src]Struct timekeeper::TimerSet
A timer set tracks a collection of timers, of which at most one can be running at any given time.
Methods
impl<Key, T, S> TimerSet<Key, T, S> where
Key: Eq + Hash + Clone,
T: Tracker,
S: Source,
[src]
Key: Eq + Hash + Clone,
T: Tracker,
S: Source,
pub fn new() -> Self
[src]
Create a new TimerSet with no currently running timer.
pub fn start(&mut self, k: Key)
[src]
Starts a specific timer, stopping the currently running timer (if any).
pub fn stop(&mut self)
[src]
Stops the currently running timer without starting any others.
pub fn is_running(&self) -> bool
[src]
Returns whether the timer is currently running.
pub fn get_stats(&self, k: Key) -> Option<T::Statistics>
[src]
pub fn num_nanoseconds(&self, k: Key) -> Option<u64>
[src]
Returns the elapsed time in nanoseconds.
pub fn num_microseconds(&self, k: Key) -> Option<u64>
[src]
Returns the elapsed time in microseconds.
pub fn num_milliseconds(&self, k: Key) -> Option<u64>
[src]
Return the elapsed time in milliseconds.
pub fn num_seconds(&self, k: Key) -> Option<u64>
[src]
Returns the elapsed time in seconds.
pub fn num_minutes(&self, k: Key) -> Option<u64>
[src]
Returns the elapsed time in minutes.
pub fn num_hours(&self, k: Key) -> Option<u64>
[src]
Returns the elapsed time in hours.
Auto Trait Implementations
impl<Key, T, S> Unpin for TimerSet<Key, T, S> where
Key: Unpin,
S: Unpin,
T: Unpin,
Key: Unpin,
S: Unpin,
T: Unpin,
impl<Key, T, S> Sync for TimerSet<Key, T, S> where
Key: Sync,
S: Sync,
T: Sync,
Key: Sync,
S: Sync,
T: Sync,
impl<Key, T, S> Send for TimerSet<Key, T, S> where
Key: Send,
S: Send,
T: Send,
Key: Send,
S: Send,
T: Send,
impl<Key, T, S> RefUnwindSafe for TimerSet<Key, T, S> where
Key: RefUnwindSafe,
S: RefUnwindSafe,
T: RefUnwindSafe,
Key: RefUnwindSafe,
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<Key, T, S> UnwindSafe for TimerSet<Key, T, S> where
Key: UnwindSafe,
S: UnwindSafe,
T: UnwindSafe,
Key: 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,