pub struct PerformancePeriod { /* private fields */ }
Expand description
A PerformanceMark records a start and end point.
Implementations§
Source§impl PerformancePeriod
impl PerformancePeriod
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new PerformancePeriod starting now.
Sourcepub fn end(&mut self)
pub fn end(&mut self)
Mark the end of a PerformancePeriod
Sourcepub fn duration(&self) -> Duration
pub fn duration(&self) -> Duration
Get the duration of a PerformancePeriod. If the end has not been marked, then this returns the duration since the PerformancePeriod started.
Trait Implementations§
Source§impl Clone for PerformancePeriod
impl Clone for PerformancePeriod
Source§fn clone(&self) -> PerformancePeriod
fn clone(&self) -> PerformancePeriod
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PerformancePeriod
impl Debug for PerformancePeriod
Source§impl Default for PerformancePeriod
impl Default for PerformancePeriod
Source§impl PartialEq for PerformancePeriod
impl PartialEq for PerformancePeriod
Source§impl PartialOrd for PerformancePeriod
impl PartialOrd for PerformancePeriod
impl Copy for PerformancePeriod
impl StructuralPartialEq for PerformancePeriod
Auto Trait Implementations§
impl Freeze for PerformancePeriod
impl RefUnwindSafe for PerformancePeriod
impl Send for PerformancePeriod
impl Sync for PerformancePeriod
impl Unpin for PerformancePeriod
impl UnwindSafe for PerformancePeriod
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more