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.3.1.tar.gz (4.0 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.3.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for chronolight-1.3.1.tar.gz
Algorithm Hash digest
SHA256 cc8a15f33bf7daf6e71720b5aefd1482b2f99aaefeb8e753966b5a3b8ab8cb7e
MD5 0ddb307de62aae4d3dd1273db35f5de7
BLAKE2b-256 ee7708d8520c8d52cb6383a4a1ba4f69c0a6498ddef755bc28f966ebb566ed51

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chronolight-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5d03223c8eb30e84250f166da05c0b7dd19fc5c49bb9d2accb22cb12d990aeb9
MD5 9646fa42e912d175db96d0c7ba20ee1d
BLAKE2b-256 4e62251610eee9b93ac139203918c20238298fffef8b8c8acf641d8f24c3864e

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