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 details)
Built Distribution
File details
Details for the file fps-limiter-0.1.1.tar.gz
.
File metadata
- Download URL: fps-limiter-0.1.1.tar.gz
- Upload date:
- Size: 1.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
36c09483b5aeecbca0f2ee7f0c1d59bd4a745c426c668a26c5685db94fa193f1
|
|
MD5 |
106defe8f4272722a14d53360d503294
|
|
BLAKE2b-256 |
ae4b3cede46b2bc95dcb9eba294955e161fd267d510aab4f5a35991582503e97
|
File details
Details for the file fps_limiter-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: fps_limiter-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4927d3448fa558db4eb51998691a7e84ac982e653e1c887e348cceee9b7623ed
|
|
MD5 |
a51e43b1fa9b70fa4fe96ce02b3a9994
|
|
BLAKE2b-256 |
fe8f24f08ddd2114f9e9c2e198582d4f7de1834da2981b21101c858d98a0566f
|