frame_timer 0.1.2

A simple frame limiter for games
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 0 items with examples
  • Size
  • Source code size: 5.35 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.28 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • TuckerBMorgan/FrameTimer
    0 1 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • TuckerBMorgan

FrameTimer

A rust drop in frame timer

BETA VERSION

This is a frame timer for rust, meant to be used to insure that game loops stay to a certain rate

It is meant to be as simple as can be First create it like this

let mut frame_timer: FrameTimer = FrameTimer::new();

At the start of your game loop call

frame_timer.frame_start();

At the end of your game loop call

frame_timer.frame_end();

and that will limit your game to 60 frames a second

Future features

  1. Add in a delta frame calculation and varible
  2. Make the frame timer smarter so that it may account for inconsistent sleep times
  3. Open to suggestions