Symfony\Component\Stopwatch\StopwatchEvent
Represents an Event managed by Stopwatch.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class StopwatchEvent
{
- // members
- private array $periods;
- private float $origin;
- private string $category;
- private array $started;
- // methods
- public void __construct()
- public string getCategory()
- public integer getOrigin()
- public StopwatchEvent start()
- public StopwatchEvent stop()
- public bool isStarted()
- public StopwatchEvent lap()
- public void ensureStopped()
- public array getPeriods()
- public integer getStartTime()
- public integer getEndTime()
- public integer getDuration()
- public integer getMemory()
- protected float getNow()
- private float formatTime()
Members
private
- $category — string
- $origin — float
- $periods — array
- $started — array
Methods
private
- formatTime() — Formats a time.
protected
- getNow() — Return the current time relative to origin.
public
- __construct() — Constructor.
- ensureStopped() — Stops all non already stopped periods.
- getCategory() — Gets the category.
- getDuration() — Gets the duration of the events (including all periods).
- getEndTime() — Gets the relative time of the end of the last period.
- getMemory() — Gets the max memory usage of all periods.
- getOrigin() — Gets the origin.
- getPeriods() — Gets all event periods.
- getStartTime() — Gets the relative time of the start of the first period.
- isStarted() — Checks if the event was started
- lap() — Stops the current period and then starts a new one.
- start() — Starts a new event period.
- stop() — Stops the last started event period.