A simple library for easily working with time
Project description
chronolight
A simple library for working with timelines and delayed calls.
Installation
pip install chronolight
Quick Start
import chronolight
# Timeline
tl = chronolight.Timeline()
tl.wait(1)
tl.call(lambda: print("1 second passed"))
tl.wait(0.5)
tl.call(lambda: print("Another 0.5 seconds passed"))
tl.run()
# Delayed call
chronolight.delay(2, lambda: print("After 2 seconds"))
Methods
Timeline
| Method | Description |
|---|---|
.wait(seconds) |
Adds a delay |
.call(func) |
Adds a function call |
.run(threaded=False) |
Runs the timeline |
delay(seconds, function)
Executes a function after N seconds (in a separate thread).
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
chronolight-1.2.7.tar.gz
(3.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chronolight-1.2.7.tar.gz.
File metadata
- Download URL: chronolight-1.2.7.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4eb353a62d386d5a6602a46a45f18d832c9fdd332bb318352e11ab2f4a619f33
|
|
| MD5 |
000cd87d1ea416967bf79c94264907e0
|
|
| BLAKE2b-256 |
35f177e67b0a2e94e69b7eafef600a40f0902dcdb60f42287dd86fcd3acbc1a6
|
File details
Details for the file chronolight-1.2.7-py3-none-any.whl.
File metadata
- Download URL: chronolight-1.2.7-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dabef04de214dad51cc8ede058214cc74f3a0216170488af609b02ba0ad816f4
|
|
| MD5 |
0a10b81bc1482a04917ee8d18d3eb273
|
|
| BLAKE2b-256 |
fa64ee7cb54825c5d6b15b736256886ce28af0f83498cc6d057baf8566d5c712
|