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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for chronolight-1.6.2.tar.gz
Algorithm Hash digest
SHA256 b19de07e6a74c128b7779f91e55827785c77b5a95762b3377a67c8f707dddfa1
MD5 37afdae39e18682c487a5ca10c6121cd
BLAKE2b-256 c3839f78030d2cc8e15dd1056d0fce01dc50296fff94c657b10d38b11955c282

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chronolight-1.6.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 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.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a73cd8161280ec7af032095af57d8d4d45d47d1858a8d0a1f72a8a33f6f29aa7
MD5 0b6c74c349fcbfa418f42649add04719
BLAKE2b-256 fa3b737796d8bc6e5997c5e3773b28b481d502ae01e3caddc40dfa5e08397f22

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