pub struct PhaseTimer { /* private fields */ }Expand description
Per-stage wall-time accumulator. Lock-free, allocation-free.
Implementations§
Source§impl PhaseTimer
impl PhaseTimer
pub fn new() -> Self
pub fn frames(&self) -> u64
pub fn total(&self) -> Duration
pub fn avg(&self) -> Duration
pub fn min(&self) -> Duration
pub fn max(&self) -> Duration
Sourcepub fn fps(&self) -> f64
pub fn fps(&self) -> f64
Throughput in frames-per-second, computed from frames / total_time.
Returns 0.0 if no time was recorded.
pub fn snapshot(&self) -> PhaseSnapshot
Trait Implementations§
Source§impl Debug for PhaseTimer
impl Debug for PhaseTimer
Auto Trait Implementations§
impl !Freeze for PhaseTimer
impl RefUnwindSafe for PhaseTimer
impl Send for PhaseTimer
impl Sync for PhaseTimer
impl Unpin for PhaseTimer
impl UnsafeUnpin for PhaseTimer
impl UnwindSafe for PhaseTimer
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more