Struct performance_mark::PerformancePeriod
source · 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<PerformancePeriod> for PerformancePeriod
impl PartialEq<PerformancePeriod> for PerformancePeriod
source§fn eq(&self, other: &PerformancePeriod) -> bool
fn eq(&self, other: &PerformancePeriod) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PerformancePeriod> for PerformancePeriod
impl PartialOrd<PerformancePeriod> for PerformancePeriod
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more