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.5.tar.gz
(3.9 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.5.tar.gz.
File metadata
- Download URL: chronolight-1.2.5.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9db20c03ce74a2a9ba3166a1539e9a60467b7f9c5629495998375dcb1c65328
|
|
| MD5 |
1fdc9966b2782a6b2f12a8fa193773ce
|
|
| BLAKE2b-256 |
d67bf46f1d4ba39b880380ca0c0c517678edc550fe4226dbd379fcf3bcb5aad9
|
File details
Details for the file chronolight-1.2.5-py3-none-any.whl.
File metadata
- Download URL: chronolight-1.2.5-py3-none-any.whl
- Upload date:
- Size: 4.5 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 |
0ea45f873c888994ef2402ef88dbb4459bff5bcd46742110b5adc29bb96727f9
|
|
| MD5 |
4d4457174d6085777e2277238cb02609
|
|
| BLAKE2b-256 |
ea18f3f27b7ca9c167450b2da95f506cd8f3710f871fb93524b4303198b482db
|