Clock
import asyncgui
from asyncgui_ext.clock import Clock
clock = Clock()
async def async_fn():
await clock.sleep(20) # Waits for 20 time units
print("Hello")
asyncgui.start(async_fn())
clock.advance(10) # Advances the clock by 10 time units.
clock.advance(10) # Total of 20 time units. The async_fn will wake up, and prints 'Hello'.
The example above effectively illustrate how this module works but it's not practical.
In a real-world program, you probably want to call clock.advance() in a main loop.
For example, if you are using PyGame, you may want to do:
pygame_clock = pygame.time.Clock()
clock = asyncgui_ext.clock.Clock()
# main loop
while running:
...
dt = pygame_clock.tick(fps)
clock.advance(dt)
Installation
Pin the minor version.
pip install "asyncgui-ext-clock>=0.6,<0.7"
Tested on
- CPython 3.10
- CPython 3.11
- CPython 3.12
- CPython 3.13
- CPython 3.14
- PyPy 3.10
Metadata
Release files for asyncgui-ext-clock 0.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| asyncgui_ext_clock-0.6.2.tar.gz | 5.5 kB | With provenance | Details for asyncgui_ext_clock-0.6.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| asyncgui_ext_clock-0.6.2-py3-none-any.whl | Python 3 | none | any | Details for asyncgui_ext_clock-0.6.2-py3-none-any.whl |
Total release size: 11.5 kB
Release files / asyncgui_ext_clock-0.6.2.tar.gz
| Download URL | asyncgui_ext_clock-0.6.2.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7b8a16b7a1d2c45afdc633e7bb01cf57a58193af91da5726b2a1d666a3b3500
|
|
BLAKE2b-256 checksum How to use checksums |
bdf2a62d987cce8e685c8c09895dc27b157e86f9d4a6b48964739dc39a3fc54f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 30, 2026.
Transparency logRelease files / asyncgui_ext_clock-0.6.2-py3-none-any.whl
| Download URL | asyncgui_ext_clock-0.6.2-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ad5af0bfe591a513a778a9a47f0ece82f2470ed4e1066c04fed37754a970a5d
|
|
BLAKE2b-256 checksum How to use checksums |
436753b8cbd3687e711c1cf27ab258ca7659c3c47d7e9a4278945694fcd41816
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 30, 2026.
Transparency logSecurity for asyncgui-ext-clock 0.6.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for asyncgui_ext_clock-0.6.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.