PHP code example of desarrolla2 / timer

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

    

desarrolla2 / timer example snippets

 php   

lla2\Timer\Timer;

$timer = new Timer();

$timer->mark('Starting a mark previous to operations');

foreach ($aLotOfOperations as $operation) {
    $timer->mark('Start operation '.$operation->name);
    
    $operation->doSomething();
    
    $timer->mark('End operation '.$operation->name);
}

$timer->mark('Ended a mark previous to operations');