Struct amethyst_utils::fps_counter::FPSCounter [−][src]
pub struct FPSCounter { /* fields omitted */ }The FPSCounter resource needed by the FPSCounterSystem.
Add it to your resources with id 0 to be able to use the FPSCounterSystem.
Usage:
Get the FPSCounter resource from the world then call either frame_fps or sampled_fps to
get the FPS.
Methods
impl FPSCounter[src]
impl FPSCounterpub fn new(samplesize: usize) -> FPSCounter[src]
pub fn new(samplesize: usize) -> FPSCounterCreates a new FPSCounter that calculates the average fps over samplesize values.
pub fn push(&mut self, elem: u64)[src]
pub fn push(&mut self, elem: u64)Add a new delta time value.
pub fn frame_fps(&self) -> f32[src]
pub fn frame_fps(&self) -> f32Get the fps of the this frame.
pub fn sampled_fps(&self) -> f32[src]
pub fn sampled_fps(&self) -> f32Get the average fps over the samplesize frames.
Trait Implementations
impl Default for FPSCounter[src]
impl Default for FPSCounterAuto Trait Implementations
impl Send for FPSCounter
impl Send for FPSCounterimpl Sync for FPSCounter
impl Sync for FPSCounter