# Glock - a Clock abstraction for gevent #
Most likely your application is in some way working with the concept of time. It can be timeouts, it can be tasks that should be executed within regular intervals.
Glock (Gevent cLOCK) tries to encapsulate time-related functionality into a simple Clock class. Also provided is a mock Clock class allowing deterministic testing.
Usage:
from glock.clock import Clock
c = Clock() c.call_later(1, fn)
API:
The call_later(seconds, fn, *args, **kw) method calls fn seconds from now. A DelayedCall instance is returned that can be used to reschedule the call (using reset) or cancel it (using cancel).
The clock also have a sleep method that acts just like gevent.sleep. To read out the current time, use the time method.
The MockClock method also has an advance method that is used to advance time in a controlled manner.
Metadata
Release files for glock 0.1
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 |
|---|---|---|---|---|
| glock-0.1.tar.gz | 3.7 kB | Without provenance | Details for glock-0.1.tar.gz |
Release files / glock-0.1.tar.gz
| Download URL | glock-0.1.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b541a9d4229dcbe9ce5a7fec4e3a0ee032fc4ebda4bfdbe9c9c53c9f07dd649e
|
|
BLAKE2b-256 checksum How to use checksums |
519d280890d0fa0dd39310f5753bce4245e60489bad8591c7c158329d1329d87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for glock 0.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.