[−][src]Struct game_time::framerate::sample::RunningAverageSampler
A frame rate sampler that computes a moving average from past frames without caching data.
RunningAverageSampler computes the average value by computing (avg*(N-1) + next) / N.
This method does not require caching past frames, but is sensitive to large outliers
influencing the value for many frames.
Methods
impl RunningAverageSampler[src]
impl RunningAverageSamplerpub fn new() -> RunningAverageSampler[src]
pub fn new() -> RunningAverageSamplerConstruct a new RunningAverageSampler with a default sample size.
pub fn with_max_samples(max_samples: u32) -> RunningAverageSampler[src]
pub fn with_max_samples(max_samples: u32) -> RunningAverageSamplerConstruct a RunningAverageSampler with a specified sample size.
Trait Implementations
impl FrameRateSampler for RunningAverageSampler[src]
impl FrameRateSampler for RunningAverageSamplerfn tick(&mut self, time: &GameTime)[src]
fn tick(&mut self, time: &GameTime)fn average_frame_rate(&self) -> f64[src]
fn average_frame_rate(&self) -> f64fn is_saturated(&self) -> bool[src]
fn is_saturated(&self) -> boolfn max_samples(&self) -> u32[src]
fn max_samples(&self) -> u32impl Default for RunningAverageSampler[src]
impl Default for RunningAverageSamplerfn default() -> RunningAverageSampler[src]
fn default() -> RunningAverageSamplerimpl Clone for RunningAverageSampler[src]
impl Clone for RunningAverageSamplerfn clone(&self) -> RunningAverageSampler[src]
fn clone(&self) -> RunningAverageSamplerfn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Debug for RunningAverageSampler[src]
impl Debug for RunningAverageSamplerAuto Trait Implementations
impl Send for RunningAverageSampler
impl Send for RunningAverageSamplerimpl Sync for RunningAverageSampler
impl Sync for RunningAverageSamplerBlanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, impl<T> From for T[src]
impl<T> From for Timpl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeIdimpl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut Timpl<T, U> IntoDuration for T where
U: FromDuration<T>, [src]
impl<T, U> IntoDuration for T where
U: FromDuration<T>, type Error = <U as FromDuration<T>>::Error
fn into_duration(self) -> Result<U, <U as FromDuration<T>>::Error>[src]
fn into_duration(self) -> Result<U, <U as FromDuration<T>>::Error>