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.5.tar.gz
(3.7 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.5.tar.gz.
File metadata
- Download URL: chronolight-1.4.5.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fcefacad2cac65fee3110d8bf8f0c5f325f6fb9208f44d595ae478c9c5f910e
|
|
| MD5 |
92af12f2451374e4d00f447e023d7baf
|
|
| BLAKE2b-256 |
41d76a7389f239e00998750dcf0965018b21b80712dc5e2ff908c4d1236290a7
|
File details
Details for the file chronolight-1.4.5-py3-none-any.whl.
File metadata
- Download URL: chronolight-1.4.5-py3-none-any.whl
- Upload date:
- Size: 3.9 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 |
541dc95892684bde97a70a3fde49b6978463d85b51bb8a89e3c30e2434aba183
|
|
| MD5 |
b3948b786222a1b144b57ac50f495be4
|
|
| BLAKE2b-256 |
9f777317776f318277fec2f58e75f1ead2992f25c09e2e25bf745a20da0201d9
|