Skip to content

Frames per second counter for embedded devices

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

LechevSpace/embedded-fps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

embedded-fps

sponsor-uscrates-iodocs-rs

Frames Per Second counter for embedded devices

Create an FPS struct by passing the MAX_FPS (maximum frames per seconds) that you expect to hit and a embedded_time Clock implementation.

FPS counter with Embedded-graphics & simulator

Examples

Frames Per Second with a simple for-loop

Run the example from the examples directory using:

cargo run --features=std --example fps_counter

Frames Per Second with embedded-graphics

This crate is suitable for usage with the embedded-graphics crate when you want to know, log or even show the frames per second of a display with an embedded device.

Note: This example requires embedded-graphics-simulator and SDL2 installed on your machine.

Refer to the embedded-graphics-simulator documentation for detailed instructions.

You can run this example from the examples directory using:

cargo run --features=std --example embedded_graphics

Crate features

  • std - enables StdClock - a Clock implementation using std for usage on a host machine.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.