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.0.tar.gz
(2.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.2.0.tar.gz.
File metadata
- Download URL: chronolight-1.2.0.tar.gz
- Upload date:
- Size: 2.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 |
07b8b0a9904e6bdef10554d8948a8f95b46296aa3f976e179d9f49b8f3ca936a
|
|
| MD5 |
110c306417ae19d0cd0c7f63ef68229d
|
|
| BLAKE2b-256 |
24e3ee6b56b9564e717d0abb8d5d8bc4c46f83f1d2abe718355ef1cef3cd2a0a
|
File details
Details for the file chronolight-1.2.0-py3-none-any.whl.
File metadata
- Download URL: chronolight-1.2.0-py3-none-any.whl
- Upload date:
- Size: 3.0 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 |
fac76520fb7665998cd11221ad45c1954b0d308b651c473b6687eb79e8e11483
|
|
| MD5 |
4aa034f581892486316ebb258c03f354
|
|
| BLAKE2b-256 |
770b5b7da24d7de04d0d6652b3fa646ae4bb48a1144b8230f0b94c68fc101487
|