pub struct FrameCounter { /* private fields */ }Expand description
A frame counter that tracks frame timing statistics.
Implementations§
Source§impl FrameCounter
impl FrameCounter
pub fn new(max_samples: usize) -> Self
pub fn tick(&mut self, dt: f64)
pub fn frame(&self) -> u64
pub fn total_time(&self) -> f64
pub fn avg_frame_time(&self) -> f64
pub fn fps(&self) -> f64
pub fn min_frame_time(&self) -> f64
pub fn max_frame_time(&self) -> f64
pub fn sample_count(&self) -> usize
pub fn reset(&mut self)
pub fn last_frame_time(&self) -> f64
Trait Implementations§
Source§impl Clone for FrameCounter
impl Clone for FrameCounter
Source§fn clone(&self) -> FrameCounter
fn clone(&self) -> FrameCounter
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for FrameCounter
impl RefUnwindSafe for FrameCounter
impl Send for FrameCounter
impl Sync for FrameCounter
impl Unpin for FrameCounter
impl UnsafeUnpin for FrameCounter
impl UnwindSafe for FrameCounter
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