An open API service indexing awesome lists of open source software.

https://github.com/carno-php/timer


https://github.com/carno-php/timer

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# Timer - component of carno-php

# Installation

```bash
composer require carno-php/timer
```

# Usages

```php
$id = Timer::loop(10, function () {
echo 'triggering every 10ms', PHP_EOL;
});
Timer::after(500, function () use ($id) {
echo 'trigger once after 500ms', PHP_EOL;
echo 'and clear previous created loop timer', PHP_EOL;
Timer::clear($id);
});
```