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.2.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.2.tar.gz.
File metadata
- Download URL: chronolight-1.5.2.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 |
248ff040bcb47c76ea41f6720a257903af586f8ff893f8309f685abe4769c25f
|
|
| MD5 |
b2bb3da7dd855c01548ee1b02bffed94
|
|
| BLAKE2b-256 |
a7e2265eb3633b49d7bd167739cddf6a93919ac463d725d2f8fe47d42705fc2b
|
File details
Details for the file chronolight-1.5.2-py3-none-any.whl.
File metadata
- Download URL: chronolight-1.5.2-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 |
3a6bcceb196b8b3977b54e7bc403d952f2e9ea389e40720aaedf66f39682a5b8
|
|
| MD5 |
88b3e85cb2b647f465b24715194d8df0
|
|
| BLAKE2b-256 |
a446ef1c80f8d33dabc2ecca2c6812f7d6d9f89977bf0298abfe09b1ab330388
|