jandreasn / a-timer
A simple timer to measure execution time.
Installs: 56 986
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 3
Open Issues: 0
Requires
- php: >=8.1
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.0 | ^11.0
- squizlabs/php_codesniffer: ^3.6
This package is auto-updated.
Last update: 2024-03-29 13:25:42 UTC
README
A simple timer to time/benchmark operations with a short human-readable result.
Installation
Add the package as a requirement to your composer.json
:
$ composer require andreasnij/a-timer
Usage
use ATimer\Timer; $timer = new Timer(); // Some operations that take time echo $timer->getDurationFormatted(); // Example output: 1.237s
Author
Andreas Nilsson (https://github.com/andreasnij)
License
Licensed under the MIT License - see the LICENSE file for details.