Skip to content

Commit

Permalink
Describe retrieval of StopwatchEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenvdv committed Feb 4, 2014
1 parent bdc6c3f commit 2ca9bd5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/stopwatch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ microtime by yourself. Instead, use the simple
// ... some code goes here
$event = $stopwatch->stop('eventName');

The :class:`Symfony\\Component\\Stopwatch\StopwatchEvent` object can be retrieved from :method:`Symfony\\Component\\Stopwatch\\Stopwatch::start`, :method:`Symfony\\Component\\Stopwatch\\Stopwatch::stop`, :method:`Symfony\\Component\\Stopwatch\\Stopwatch::lap` and :method:`Symfony\\Component\\Stopwatch\\Stopwatch::getEvent`

You can also provide a category name to an event::

$stopwatch->start('eventName', 'categoryName');
Expand Down

0 comments on commit 2ca9bd5

Please sign in to comment.