PHP code example of shawnlindstrom / laravel-timer
1. Go to this page and download the library: Download shawnlindstrom/laravel-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/ */
shawnlindstrom / laravel-timer example snippets
php
$timer = new \shawnlindstrom\Timer;
$timer->start();
// do something useful ...
$timer->stop();
echo $timer->elapsed(); // default precision is seconds
// 2
php
$timer->elapsed(TimeUnit::NANOSECONDS);
php
Timer::start();
// do something useful ...
Timer::stop();
echo Timer::elapsed(TimeUnit::MICROSECONDS);