[][src]Struct wasm_stopwatch::fps_logger::FpsLogger

pub struct FpsLogger { /* fields omitted */ }

Logs the current FPS (with the log crate) at a specified interval.

Methods

impl FpsLogger[src]

pub fn new(seconds_between_logs: f64) -> Self[src]

Creates a new FpsLogger. seconds_between_logs is the interval at which it logs the FPS.

pub fn update(&mut self)[src]

Updates the FPS logger and logs the current FPS every seconds_between_logs. Should be called once per frame.

pub fn last_fps(&self) -> i32[src]

Returns the most recently computed FPS. This is updated every time the FPS is logged.

Auto Trait Implementations

impl Send for FpsLogger

impl Sync for FpsLogger

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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.