Metadata-Version: 2.4
Name: chronolight
Version: 1.2.0
Summary: A simple library for easily working with time
Home-page: https://github.com/ISviterI/chronolight
Author: Sviter
License: MIT
Project-URL: Homepage, https://github.com/ISviterI/chronolight
Project-URL: Discord, https://discord.gg/MXv3KTFmPE
Project-URL: Wiki, https://github.com/ISviterI/chronolight/wiki
Project-URL: Documentation, https://github.com/ISviterI/chronolight/wiki/Documentation
Keywords: chronolight,chrono,timelines,delay,time,timeline,after,after_delay,afterdelay,light,chronos,simple,easy,easytoworkwith,easy_to_work_with,very_simple,cool,peak,bruh,lol,chains,chain,class,working_with_time
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary

# chronolight

[![Discord](https://img.shields.io/discord/1488880281376260186?color=7289da&label=discord&logo=discord&logoColor=white)](https://discord.gg/MXv3KTFmPE)

A simple library for working with timelines and delayed calls.

## Installation

```bash
pip install chronolight
```

## Quick Start

```python
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).
