PHP code example of mvan / stopwatch
1. Go to this page and download the library: Download mvan/stopwatch 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/ */
mvan / stopwatch example snippets
$sw = new StopWatch();
// Set a start point in time
$sw->start();
sleep(30);
// Stop measuring time
$sw->stop();
// Show results
print $sw->getResult().PHP_EOL;
print $sw->getResult(StopWatch::IN_SECONDS).PHP_EOL;
print $sw->getResult(StopWatch::IN_MINUTES).PHP_EOL;
bash
$ php composer.phar install
$ php composer.phar