File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,16 @@ microtime by yourself. Instead, use the simple
31
31
// ... some code goes here
32
32
$event = $stopwatch->stop('eventName');
33
33
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
+
34
44
You can also provide a category name to an event::
35
45
36
46
$stopwatch->start('eventName', 'categoryName');
You can’t perform that action at this time.
0 commit comments