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.5.1.tar.gz
(3.9 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.5.1.tar.gz.
File metadata
- Download URL: chronolight-1.5.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5daacb79917fcb3f9e0f6856e542c8ab09f16ba77b2df6b057f099606fdf693
|
|
| MD5 |
99d76e65a73fe92d5b0452a8b981b13a
|
|
| BLAKE2b-256 |
f8d98f5f4a210f247b35d3fc980a5dca1238d5377522df3f401f256d18dce6f1
|
File details
Details for the file chronolight-1.5.1-py3-none-any.whl.
File metadata
- Download URL: chronolight-1.5.1-py3-none-any.whl
- Upload date:
- Size: 4.1 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 |
441d85eb8b29f4ea169e77334e8c83fcfff83d1e4eacd8b033eab6c3c41db7e5
|
|
| MD5 |
cabd567387370f722dbb0120f8e60ef0
|
|
| BLAKE2b-256 |
3d60c7b14bc07c9a66d922290dfcf3980815830afdd2d47ba87ac83f69edc00a
|