Timing and measurement functions.
ggez does not try to do any framerate limitation by default. If
you want to run at anything other than full-bore max speed all the
does the same thing) yield to the OS
so it has a chance to breathe before continuing with your game.
This should prevent it from using 100% CPU unless it really needs
to. Enabling vsync by setting
vsync in your
Conf object is
generally the best way to cap your displayed framerate.
For a more detailed tutorial in how to handle frame timings in games, see http://gafferongames.com/game-physics/fix-your-timestep/
A structure that contains our time-tracking state.
This function will return true if the time since the
A convenience function to convert a Rust
A convenience function to create a Rust
Gets the average time of a frame, averaged over the last 200 frames.
Get the time between the start of the last frame and the current one; in other words, the length of the last frame.
Gets the FPS of the game, averaged over the last 200 frames.
Returns the fractional amount of a frame not consumed
Gets the number of times the game has gone through its event loop.
Returns the time since the game was initialized, as reported by the system clock.
Pauses the current thread for the target duration.
Yields the current timeslice to the OS.