Struct frame_counter::FrameCounter [−][src]
Implementations
impl FrameCounter
[src]
pub fn new(frame_rate: f64) -> Self
[src]
Creates a new FrameCounter with the given starting framerate.
Arguments
frame_rate
- initial frame rate guess.
pub fn start_frame(&mut self) -> Frame<'_>
[src]
Creates a new frame for measurements
pub fn frame_time(&self) -> Duration
[src]
Returns the frame time of the last frame as a Duration
.
pub fn avg_frame_time(&self) -> Duration
[src]
Returns the average frame time over the last second as a Duration
.
pub fn frame_rate(&self) -> f64
[src]
Returns the frame rate of the last frame.
pub fn avg_frame_rate(&self) -> f64
[src]
Returns the average frame rate of the last second.
Trait Implementations
impl Default for FrameCounter
[src]
impl Display for FrameCounter
[src]
Auto Trait Implementations
impl RefUnwindSafe for FrameCounter
impl Send for FrameCounter
impl Sync for FrameCounter
impl Unpin for FrameCounter
impl UnwindSafe for FrameCounter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,