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.4.4.tar.gz (3.4 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.4.4-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for chronolight-1.4.4.tar.gz
Algorithm Hash digest
SHA256 c2d70a84f5b226eab42ce599283110026c9d34052d1ab17e780e4d40cdbd8c87
MD5 db0488e616030af5465cb591878db124
BLAKE2b-256 504de0c120acb97bd9989bd8962c1622f76f7bc2396252176ac295cfd7a29efc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chronolight-1.4.4-py3-none-any.whl
  • Upload date:
  • Size: 3.7 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.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cd9836349f6b0e2417e526dcd28543758251c5e711cefb3a42e3fe648483919c
MD5 94d572800edc1e18232dc650bdd39e41
BLAKE2b-256 15566259d9f12c6f039c96788e4670e0301a36d9a45f283a95c0af5efa1dde76

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