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.5.3.tar.gz (3.9 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.5.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for chronolight-1.5.3.tar.gz
Algorithm Hash digest
SHA256 6f44ff6e8dd2fe12fde6ade9b935f80887981d2fb5d0196eff8b3b9f663644f3
MD5 ff26702c6695ed8f8936bdce3851a478
BLAKE2b-256 d66265fd8326069ecce0e1acf2ee3e6149899a9eb53e1b19a634a3b11b9e36a5

See more details on using hashes here.

File details

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

File metadata

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

Hashes for chronolight-1.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ca11041b6e22db0e39eb9c745cef268f6c2e5deadaa5336a2121ba1a62ad1ccd
MD5 8c3778d747b1b4e7560fd71f8051ec8f
BLAKE2b-256 7145c6f4f75b35f5ed43f76a3a20ae93d1eda346e33a81e559b2984aa9df221c

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