library timing
Allows to retrieve and measure time.
perf/timing
Allows to retrieve and measure time.
- Sunday, June 21, 2015
- by jmfeurprier
- Repository
- 1 Watchers
- 0 Stars
- 156 Installations
- PHP
- 2 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
perf timing
Timing package from perf, the PHP Extensible and Robust Framework., (*1)
Usage
Clock
<?php
$clock = new \perf\Timing\RealTimeClock();
// Will output something like "2015-01-23"
echo $clock->getDateString();
// Will output something like "15:16:17"
echo $clock->getTimeString();
// Will output something like "2015-01-23 15:16:17"
echo $clock->getDateTimeString();
// Will output something like "123456789"
echo $clock->getTimestamp();
// Will output something like "123456789.0123 "
echo $clock->getMicrotime();
Timer
<?php
$timer = new \perf\Timing\RealTimeTimer();
$timer->start();
sleep(1);
// Will output something like "1.0023456"
echo $timer->getElapsed();
sleep(1);
// Will output something like "2.0034567"
echo $timer->getElapsed();
$timer->restart();
sleep(1);
// Will output something like "1.0023456"
echo $timer->getElapsed();
sleep(1);
// Will output something like "2.0034567"
echo $timer->getElapsedAndRestart();
sleep(1);
// Will output something like "1.0023456"
echo $timer->getElapsed();
dev-master
9999999-dev
Allows to retrieve and measure time.
Sources
Download
MIT
The Requires
The Development Requires
1.0.0
1.0.0.0
Timing package from perf, the PHP Extensible and Robust Framework
Sources
Download
MIT
The Requires
The Development Requires