一个简单的计时器,用于测量执行时间。
2.1
2024-03-29 13:18 UTC
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-08-29 14:22:03 UTC
README
一个简单的计时器,用于对操作进行计时/基准测试,并提供简洁易读的结果。
安装
将包添加到您的 composer.json
文件的要求中
$ composer require andreasnij/a-timer
用法
use ATimer\Timer; $timer = new Timer(); // Some operations that take time echo $timer->getDurationFormatted(); // Example output: 1.237s
作者
Andreas Nilsson (https://github.com/andreasnij)
许可
在 MIT 许可下发布 - 有关详细信息,请参阅 LICENSE 文件。