pub struct Stopwatch { /* private fields */ }Implementations
sourceimpl Stopwatch
impl Stopwatch
sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Returns whether the stopwatch is running.
sourcepub fn elapsed_ms(&self) -> i64
pub fn elapsed_ms(&self) -> i64
Returns the elapsed time since the start of the stopwatch in milliseconds.
sourcepub fn elapsed_split(&mut self) -> Duration
pub fn elapsed_split(&mut self) -> Duration
Returns the elapsed time since last split or start/restart.
If the stopwatch is in stopped state this will always return a zero Duration.
sourcepub fn elapsed_split_ms(&mut self) -> i64
pub fn elapsed_split_ms(&mut self) -> i64
Returns the elapsed time since last split or start/restart in milliseconds.
If the stopwatch is in stopped state this will always return zero.
Trait Implementations
impl Copy for Stopwatch
Auto Trait Implementations
impl RefUnwindSafe for Stopwatch
impl Send for Stopwatch
impl Sync for Stopwatch
impl Unpin for Stopwatch
impl UnwindSafe for Stopwatch
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> SpannedItem for T
impl<T> SpannedItem for T
sourceimpl<T> TaggedItem for T
impl<T> TaggedItem for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more