一个简单的计时器,用于测量执行时间。

2.1 2024-03-29 13:18 UTC

This package is auto-updated.

Last update: 2024-08-29 14:22:03 UTC


README

Latest Stable Version

一个简单的计时器,用于对操作进行计时/基准测试,并提供简洁易读的结果。

安装

将包添加到您的 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 文件。