PHP code example of carno-php / timer
1. Go to this page and download the library: Download carno-php/timer library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
carno-php / timer example snippets
$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);
});
bash
composer