PHP code example of muzzlefork / timer

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

    

muzzlefork / timer example snippets


$t = MuzzleFork\Timer::get('x'); // Timers are inactive when started
$t->resume('Starting API call');
// do some heavy work
$t->pause('API command completed');
// go and do something else
$t->resume('Starting new API call');
$t->pause('Some other message');
	
echo $t->getTotal();