muzzlefork / timer
Basic script timers
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/muzzlefork/timer
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-10-07 08:25:49 UTC
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.