SFPS - Smooth FPS.
Project description
SFPS - Smooth FPS
SFPS
is a small and very efficient Python library which helps calculate the real-time computing frame rate with a few lines of code.
You can install from PyPI:
pip install sfps
You can import and initialize SFPS
in your Python code:
from sfps import SFPS
sfps = SFPS(nframes=8, interval=1)
nframes
(int
,default=5
) : Number of the last frames, used for averaging.interval
(int
,default=1
) : Time interval in second.
And then you can call fps()
or raw_fps()
to calculate the real-time frame rate.
...
fps = sfps.fps(format_spec='.2f')
...
For usage details, please check SFPS
. You can also check an example here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sfps-0.0.0.tar.gz
(3.7 kB
view hashes)
Built Distribution
sfps-0.0.0-py3-none-any.whl
(3.7 kB
view hashes)