Stopwatch
class Stopwatch implements ResetInterface
Stopwatch provides a way to profile code.
Methods
__construct(bool $morePrecision = false)
No description
Section[]
getSections()
No description
openSection(string|null $id = null)
Creates a new section or re-opens an existing section.
stopSection(string $id)
Stops the last started section.
start(string $name, string|null $category = null)
Starts an event.
bool
isStarted(string $name)
Checks if the event was started.
stop(string $name)
Stops an event.
lap(string $name)
Stops then restarts an event.
getEvent(string $name)
Returns a specific event by name.
getSectionEvents(string $id)
Gets all events for a given section.
reset()
Resets the stopwatch to its original state.