pub struct FpsCounter { /* fields omitted */ }
Expand description
Lightweight counter for measuring frames per second using the browser’s Performance
API, if
available.
The API is designed around use-cases like logging to console.log, rather than a permanent
on-screen FPS counter.
Construct an object for measuring frames per second. ticks_per
determines how many frames
the FPS is measured over.
Count a frame. Every self.ticks_per
calls to this method, the value Some(fps)
is
returned where fps
is the frames per second over the last ticks_per
frames. Every other
call to tick
returns None
.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,