cxj / php-interval-timers
Manage elapsed one or more elapsed time timers
1.0.1
2019-10-07 22:42 UTC
Requires
- php: >=5.1
Requires (Dev)
- phpunit/phpunit: ^7
This package is auto-updated.
Last update: 2024-11-08 09:46:06 UTC
README
A class to manage one or more elapsed-time timers, for such things as performance metrics.
Installation and Autoloading
This package is installable and PSR-4 autoloadable via Composer as cxj/php-interval-timers.
Alternatively, download a release,
or clone this repository, then map the
Cxj\
namespace to the package src/
directory.
Dependencies
This package requires PHP 5.1 or later. We recommend using the latest available version of PHP as a matter of principle.
Quality
Example Usage
<?php include "vendor/autoload.php"; $timer = new Cxj\Timers; $name = "sample timer"; $timer->start($name); usleep(1000); $r1 = $timer->read($name); echo "$r1 seconds have passed since timer was started" . PHP_EOL;