Struct game_time::framerate::counter::FrameCounter [] [src]

pub struct FrameCounter<S: FrameRateSampler> { /* fields omitted */ }

A basic frame rate counter.

Methods

impl<S: FrameRateSampler> FrameCounter<S>
[src]

Create a new FrameCounter with a target frame rate and sampler.

Set a new slow threshold.

Return the current slow threshold.

If the current frame rate divided by the target frame rate is less than this value, then FrameCount::is_running_slowly will return true.

Set the target frame rate.

Return true if the sampler is saturated.

Return a reference to the sampler object.

Trait Implementations

impl<S: Debug + FrameRateSampler> Debug for FrameCounter<S>
[src]

Formats the value using the given formatter.

impl<S: Clone + FrameRateSampler> Clone for FrameCounter<S>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<S: FrameRateSampler> FrameCount for FrameCounter<S>
[src]

The target frame rate for the simulation.

The target wall time for each frame.

The duration remaining to reach the optimal frame time. Read more

Update the counter for a new frame.

The average frame rate for the current frame.

Return whether the simulation is running slowly.