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.4.2.tar.gz
(4.3 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.4.2.tar.gz.
File metadata
- Download URL: chronolight-1.4.2.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1351f987b5b468160c548723d4a47b26f527fec4fbc927047473d5c43cdc1af6
|
|
| MD5 |
c916f90bfcdcd5aea92cdbfa2c09e650
|
|
| BLAKE2b-256 |
455384b72a697689bcecff6b42a23caad2aba17066d7b96be6ec50757508f5c2
|
File details
Details for the file chronolight-1.4.2-py3-none-any.whl.
File metadata
- Download URL: chronolight-1.4.2-py3-none-any.whl
- Upload date:
- Size: 4.8 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 |
77c5c3fc2b74fd1a3f24258878a6a724a2c19508dad60a8100255abc4c3882c6
|
|
| MD5 |
2c3d8fe9715ecff8f7305971bdfefbd9
|
|
| BLAKE2b-256 |
cf5c85d2b8a0c51f002dbc3da49025e28c90be10dbe3300d040fb4b4bbe6e38e
|