Symfony\Component\Stopwatch\Stopwatch
Stopwatch provides a way to profile code.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class Stopwatch
{
- // members
- private array $sections;
- private array $activeSections;
- // methods
- public void __construct()
- public void openSection()
- public void stopSection()
- public StopwatchEvent start()
- public bool isStarted()
- public StopwatchEvent stop()
- public StopwatchEvent lap()
- public array getSectionEvents()
Members
private
- $activeSections — array
- $sections — array
Methods
public
- __construct()
- getSectionEvents() — Gets all events for a given section.
- isStarted() — Checks if the event was started
- lap() — Stops then restarts an event.
- openSection() — Creates a new section or re-opens an existing section.
- start() — Starts an event.
- stop() — Stops an event.
- stopSection() — Stops the last started section.