[−][src]Trait game_time::framerate::counter::FrameCount
A frame rate counter and tracker.
Required Methods
fn target_frame_rate(&self) -> f64
The target frame rate for the simulation.
fn target_time_per_frame(&self) -> FloatDuration
The target wall time for each frame.
fn remaining_frame_time(&self, time: &GameTime) -> FloatDuration
The duration remaining to reach the optimal frame time.
The duration can be negative if the current frame has executed longer than the optimal time.
fn tick(&mut self, time: &GameTime)
Update the counter for a new frame.
fn average_frame_rate(&self) -> f64
The average frame rate for the current frame.
fn is_running_slow(&self, time: &GameTime) -> bool
Return whether the simulation is running slowly.
Implementors
impl<S: FrameRateSampler> FrameCount for FrameCounter<S>
[src]
impl<S: FrameRateSampler> FrameCount for FrameCounter<S>
fn target_frame_rate(&self) -> f64
[src]
fn target_frame_rate(&self) -> f64
fn target_time_per_frame(&self) -> FloatDuration
[src]
fn target_time_per_frame(&self) -> FloatDuration
fn remaining_frame_time(&self, time: &GameTime) -> FloatDuration
[src]
fn remaining_frame_time(&self, time: &GameTime) -> FloatDuration
fn tick(&mut self, time: &GameTime)
[src]
fn tick(&mut self, time: &GameTime)
fn average_frame_rate(&self) -> f64
[src]
fn average_frame_rate(&self) -> f64
fn is_running_slow(&self, time: &GameTime) -> bool
[src]
fn is_running_slow(&self, time: &GameTime) -> bool