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.6.1.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.6.1.tar.gz.
File metadata
- Download URL: chronolight-1.6.1.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 |
9f15fe3d8e063de32b9a852778f4c300d0f698a6e7eb9c1865141bc518b6f773
|
|
| MD5 |
9b923927c1e6bc10653b9b21077c9e90
|
|
| BLAKE2b-256 |
66ce215654a3d73d2405a08de23d52b0de754d34d866f672645d0950ebf0e623
|
File details
Details for the file chronolight-1.6.1-py3-none-any.whl.
File metadata
- Download URL: chronolight-1.6.1-py3-none-any.whl
- Upload date:
- Size: 4.3 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 |
64706de4d220967fdded50715624ca0a93b638397ba6592087463f3fba6d3fd4
|
|
| MD5 |
c4e5125226a6525e34c8dfd0f3437c1f
|
|
| BLAKE2b-256 |
e03c7ba9869c98d7693670e82064da466f318db69c03304003c1719d98e912f6
|