PHP code example of eleme / timer

1. Go to this page and download the library: Download eleme/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/ */

    

eleme / timer example snippets




use Eleme\Timer\Collection;

space');
$collection->start('test');
usleep(500000);
$collection->stop('test');
$collection->start('test');
usleep(1000000);
$collection->stop('test');
$collection->start('fast');
$collection->stop('fast');
foreach ($collection as $name => $timer) {
    echo $name, "\n";
    foreach ($timer->delta() as $value) {
        echo $value, "\n";
    }
}