muzzlefork/timer
Composer 安装命令:
composer require muzzlefork/timer
包简介
Basic script timers
README 文档
README
Basic composer package for PHP allowing you to time actions.
Installation:
composer require "muzzlefork/timer 0.1.*"
Usage:
$t = MuzzleFork\Timer::get('x'); // Timers are inactive when started $t->resume('Starting API call'); // do some heavy work $t->pause('API command completed'); // go and do something else $t->resume('Starting new API call'); $t->pause('Some other message'); echo $t->getTotal();
Of note:
- When you create a timer, it is inactive, so you should ->start() or ->resume() it.
- You can pass a message to ->resume($msg) and ->pause($msg) which can be handy when getting the full list out.
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-07-29