Struct fps_clock::FpsClock
[−]
[src]
pub struct FpsClock { /* fields omitted */ }
A structure that keeps your game loop running at a constant FPS
Methods
impl FpsClock
[src]
fn new(fps: u32) -> FpsClock
[src]
Constructs a new FpsClock from the specified FPS
fn fps(&self) -> u32
[src]
Returns the FPS that this FpsClock is set to run at.
fn tick(&mut self) -> f32
[src]
Makes the game loop slow down to run at the correct FPS. Returns the time in nanoseconds since the last time tick() was called.