29/07
2013
Wallogit.com
2017 © Pedro Peláez
Basic script timers
Basic composer package for PHP allowing you to time actions., (*1)
Installation:
composer require "muzzlefork/timer 0.1.*", (*2)
Usage:, (*3)
$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();
Of note:, (*4)