PHP code example of pyrsmk / illuminator
1. Go to this page and download the library: Download pyrsmk/illuminator 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/ */
pyrsmk / illuminator example snippets
$chrono = new Illuminator\Chrono();
// Start!
$chrono->start();
// Stop the chrono for some time...
$chrono->stop();
// Resume the chrono
$chrono->start();
// Return the time in seconds
$chrono->read();
// Reset the still running chrono
$chrono->reset();
// Return the reseted time
$chrono->read();
// Completely stop and reset the chrono
$chrono->stop();
$chrono->reset();
$chrono->readAsMilliseconds();
$chrono = new Illuminator\LazyChrono();
usleep(1000);
$chrono->read();
$timedTask = new TimedTask(function () {
usleep(1000);
});
$timedTask->read();