1. Go to this page and download the library: Download digivo/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/ */
digivo / timer example snippets
namespace App\Controller;
use Digivo\Timer\TimerTrait;
class FunController
{
use TimerTrait;
public function run()
{
$this->startTimer('app');
sleep(2);
$this->splitTimer('app', 'Woke up for a while');
sleep(1);
$this->splitTimer('app', 'Another little nap');
sleep(3);
$this->stopTimer('app');
var_export($this->returnTimer('app'));
}
}