Limit while loop at certain fps rate.
Project description
Limit while loop at certain fps rate
Installation
pip install fps-limiter
Examples
Example #1
from fps_limiter import LimitFPS, FPSCounter
fps_limiter = LimitFPS(fps=15)
fps_counter = FPSCounter()
while True:
if fps_limiter():
print("current fps: %s" % fps_counter())
Example #2
from fps_limiter import LimitFPS, FPSCounter
fps_limiter = LimitFPS(fps=15)
while True:
if fps_limiter():
print("elapsed seconds: %s" % fps_limiter.get_elapsed_seconds())
License
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
fps-limiter-0.1.1.tar.gz
(1.5 kB
view hashes)
Built Distribution
Close
Hashes for fps_limiter-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4927d3448fa558db4eb51998691a7e84ac982e653e1c887e348cceee9b7623ed |
|
MD5 | a51e43b1fa9b70fa4fe96ce02b3a9994 |
|
BLAKE2b-256 | fe8f24f08ddd2114f9e9c2e198582d4f7de1834da2981b21101c858d98a0566f |