File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Top Open diff view settings Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Top Open diff view settings Original file line number Diff line number Diff line change @@ -31,6 +31,16 @@ microtime by yourself. Instead, use the simple
3131 // ... some code goes here
3232 $event = $stopwatch->stop('eventName');
3333
34+ .. versionadded :: 2.5
35+ The ``getEvent() `` method was introduced in Symfony 2.5
36+
37+ The :class: `Symfony\\ Component\\ Stopwatch\S topwatchEvent ` object can be retrieved from the
38+ :method: `Symfony\\ Component\\ Stopwatch\\ Stopwatch::start `,
39+ :method: `Symfony\\ Component\\ Stopwatch\\ Stopwatch::stop `,
40+ :method: `Symfony\\ Component\\ Stopwatch\\ Stopwatch::lap ` and
41+ :method: `Symfony\\ Component\\ Stopwatch\\ Stopwatch::getEvent ` methods.
42+ The latter should be used when you need to retrieve the duration of an event while it is still running.
43+
3444You can also provide a category name to an event::
3545
3646 $stopwatch->start('eventName', 'categoryName');
You can’t perform that action at this time.
0 commit comments