We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6c6e0c4 + f7a7ff2 commit 7c1178cCopy full SHA for 7c1178c
components/stopwatch.rst
@@ -27,10 +27,15 @@ time of certain parts of code so that you don't constantly have to parse
27
use Symfony\Component\Stopwatch\Stopwatch;
28
29
$stopwatch = new Stopwatch();
30
+
31
// starts event named 'eventName'
32
$stopwatch->start('eventName');
- // ... some code goes here
33
34
+ // ... run your code here
35
36
$event = $stopwatch->stop('eventName');
37
+ // you can convert $event into a string for a quick summary
38
+ // e.g. (string) $event = '4.50 MiB - 26 ms'
39
40
The :class:`Symfony\\Component\\Stopwatch\\StopwatchEvent` object can be retrieved
41
from the :method:`Symfony\\Component\\Stopwatch\\Stopwatch::start`,
0 commit comments