StopwatchEvent
class StopwatchEvent
Represents an Event managed by Stopwatch.
Methods
Constructor.
Gets the category.
Gets the origin.
Starts a new event period.
Stops the last started event period.
Checks if the event was started.
Stops the current period and then starts a new one.
Stops all non already stopped periods.
Gets all event periods.
Gets the relative time of the start of the first period.
Gets the relative time of the end of the last period.
Gets the duration of the events (including all periods).
Gets the max memory usage of all periods.
No description
Details
at line line 49
__construct(float $origin, string|null $category = null)
Constructor.
at line line 60
string
getCategory()
Gets the category.
at line line 70
float
getOrigin()
Gets the origin.
at line line 80
StopwatchEvent
start()
Starts a new event period.
at line line 96
StopwatchEvent
stop()
Stops the last started event period.
at line line 112
bool
isStarted()
Checks if the event was started.
at line line 122
StopwatchEvent
lap()
Stops the current period and then starts a new one.
at line line 130
ensureStopped()
Stops all non already stopped periods.
at line line 142
StopwatchPeriod[]
getPeriods()
Gets all event periods.
at line line 152
int
getStartTime()
Gets the relative time of the start of the first period.
at line line 162
int
getEndTime()
Gets the relative time of the end of the last period.
at line line 174
int
getDuration()
Gets the duration of the events (including all periods).
at line line 198
int
getMemory()
Gets the max memory usage of all periods.