frametimer
An accurate clock/timer that can be used to help obtain constant framerates. It uses a hybrid approach of sleeping for most of the required duration, then spin-waiting for the rest.
Installation
pip install frametimer
(Or just grab the .py file, it's a simple module)
Usage
timer = frametimer.FrameTimer(60)
while run_main_loop:
dt = timer.tick()
update(dt)
...
Metadata
Release files for frametimer 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| frametimer-2.0.0.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| frametimer-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.3 kB
Release files / frametimer-2.0.0.tar.gz
| Download URL | frametimer-2.0.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a9285923cd4c5f7bc7f8f55ba7987f737035326dc3082f57a46d439868927e6
|
|
BLAKE2b-256 checksum How to use checksums |
968baf9596b1751a6f211a438fd602f7766f39fd15cdd38c3b9e1d41eac51eb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / frametimer-2.0.0-py3-none-any.whl
| Download URL | frametimer-2.0.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0341ba3e174bdcd996c7368272fffd329a0102aaa383078df9d2edb53cadf2a3
|
|
BLAKE2b-256 checksum How to use checksums |
424302fb8596a3b28eb8033da2cdf7afc5f627cf1227b59626227f3e8418af7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|