Skip to main content

A simple library for easily working with time

Project description

chronolight

Discord

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


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.8.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chronolight-1.2.8-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file chronolight-1.2.8.tar.gz.

File metadata

  • Download URL: chronolight-1.2.8.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for chronolight-1.2.8.tar.gz
Algorithm Hash digest
SHA256 0fa865958ec9588c0376ccb9a6b3b451b5d607e04b9529ced803cd8d2b5a8f18
MD5 b092bc29b89fa95b7a656bd2e8d31409
BLAKE2b-256 9eadf031432663abe61a6eb2538d0c2496b7a97a54771f0e28a86b4b106b1223

See more details on using hashes here.

File details

Details for the file chronolight-1.2.8-py3-none-any.whl.

File metadata

  • Download URL: chronolight-1.2.8-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

Hashes for chronolight-1.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a3bb9575baf7022411275a4c3a8e387f46458226dd374fd4cb88234ba5f3cedc
MD5 be38271e90a755b7b059ebdb6c2fc8e2
BLAKE2b-256 e67bfcfb1eedbd1df159f2a1f3b11d574e2016003d04ae02afe7fb076243dd81

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page