pub struct TotalFrameCounter { /* private fields */ }Expand description
Frame counter that supports both drop-frame and non-drop-frame modes.
Implementations§
Source§impl TotalFrameCounter
impl TotalFrameCounter
Sourcepub fn new_drop_frame() -> Self
pub fn new_drop_frame() -> Self
Create a new frame counter in drop-frame mode.
Sourcepub fn new_non_drop_frame(fps: u8) -> Self
pub fn new_non_drop_frame(fps: u8) -> Self
Create a new frame counter in non-drop-frame mode.
Sourcepub fn add_frames(&mut self, n: u64)
pub fn add_frames(&mut self, n: u64)
Add frames to the counter.
Sourcepub fn frame_count(&self) -> u64
pub fn frame_count(&self) -> u64
Get the current frame count.
Sourcepub fn is_drop_frame(&self) -> bool
pub fn is_drop_frame(&self) -> bool
Check if drop-frame mode is active.
Trait Implementations§
Source§impl Clone for TotalFrameCounter
impl Clone for TotalFrameCounter
Source§fn clone(&self) -> TotalFrameCounter
fn clone(&self) -> TotalFrameCounter
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 moreSource§impl Debug for TotalFrameCounter
impl Debug for TotalFrameCounter
Auto Trait Implementations§
impl Freeze for TotalFrameCounter
impl RefUnwindSafe for TotalFrameCounter
impl Send for TotalFrameCounter
impl Sync for TotalFrameCounter
impl Unpin for TotalFrameCounter
impl UnsafeUnpin for TotalFrameCounter
impl UnwindSafe for TotalFrameCounter
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