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.3.3.tar.gz
(4.0 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.3.3.tar.gz.
File metadata
- Download URL: chronolight-1.3.3.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e8b205ad8dfab504f94d181a77280648c3087a1e03999272f02415dede78cda
|
|
| MD5 |
71b088a8f9c58510282a5ded1e146755
|
|
| BLAKE2b-256 |
b4bce9cd9e5984571f095378ed371fec7d3fd28bcf4289273167b87a01e3b622
|
File details
Details for the file chronolight-1.3.3-py3-none-any.whl.
File metadata
- Download URL: chronolight-1.3.3-py3-none-any.whl
- Upload date:
- Size: 4.6 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 |
800271cc2e7a3fa0c63c359772be9171932eaf21d9fd965941052e7b62dd6b7e
|
|
| MD5 |
311f879ac7848a99945316609edbb0b9
|
|
| BLAKE2b-256 |
0790348d20db6b11d410338b38e677872277115151302301a76ee64bbd5c0503
|