You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
pecintaseni 7f27c5ed8e adding Composer 3 weeks ago
..
CHANGELOG.md adding Composer 3 weeks ago
LICENSE adding Composer 3 weeks ago
README.md adding Composer 3 weeks ago
Section.php adding Composer 3 weeks ago
Stopwatch.php adding Composer 3 weeks ago
StopwatchEvent.php adding Composer 3 weeks ago
StopwatchPeriod.php adding Composer 3 weeks ago
composer.json adding Composer 3 weeks ago

README.md

Stopwatch Component

The Stopwatch component provides a way to profile code.

Getting Started

$ composer require symfony/stopwatch
use Symfony\Component\Stopwatch\Stopwatch;

$stopwatch = new Stopwatch();

// optionally group events into sections (e.g. phases of the execution)
$stopwatch->openSection();

// starts event named 'eventName'
$stopwatch->start('eventName');

// ... run your code here

// optionally, start a new "lap" time
$stopwatch->lap('foo');

// ... run your code here

$event = $stopwatch->stop('eventName');

$stopwatch->stopSection('phase_1');

Resources