PHP code example of edbizarro / timer
1. Go to this page and download the library: Download edbizarro/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/ */
edbizarro / timer example snippets
use Edbizarro\Timer\Timer;
$timer = Timer::start('timer01');
sleep(2);
$result = $timer->stop();
print_r($result);
// array:7 [
// "start" => 1529506852.084
// "end" => 1529506854.0855
// "duration" => 2.0015239715576
// "milliseconds" => 2001.5239715576
// "seconds" => 2
// "minutes" => 0
// "hours" => 0
// ]