class StopwatchEvent
Represents an Event managed by Stopwatch.
Methods
__construct(float $origin, string|null $category = null) Constructor. | ||
string | getCategory() Gets the category. | |
float | getOrigin() Gets the origin. | |
StopwatchEvent | start() Starts a new event period. | |
StopwatchEvent | stop() Stops the last started event period. | |
bool | isStarted() Checks if the event was started. | |
StopwatchEvent | lap() Stops the current period and then starts a new one. | |
ensureStopped() Stops all non already stopped periods. | ||
StopwatchPeriod[] | getPeriods() Gets all event periods. | |
int | getStartTime() Gets the relative time of the start of the first period. | |
int | getEndTime() Gets the relative time of the end of the last period. | |
int | getDuration() Gets the duration of the events (including all periods). | |
int | getMemory() Gets the max memory usage of all periods. | |
string | __toString() |
Details
__construct(float $origin, string|null $category = null)
Constructor.
string getCategory()
Gets the category.
float getOrigin()
Gets the origin.
StopwatchEvent start()
Starts a new event period.
StopwatchEvent stop()
Stops the last started event period.
bool isStarted()
Checks if the event was started.
StopwatchEvent lap()
Stops the current period and then starts a new one.
ensureStopped()
Stops all non already stopped periods.
StopwatchPeriod[] getPeriods()
Gets all event periods.
int getStartTime()
Gets the relative time of the start of the first period.
int getEndTime()
Gets the relative time of the end of the last period.
int getDuration()
Gets the duration of the events (including all periods).
int getMemory()
Gets the max memory usage of all periods.
Please login to continue.