Section
    
            
            in package
            
        
    
    
    
Stopwatch section.
Tags
Table of Contents
Methods
- __construct() : mixed
 - get() : self|null
 - Returns the child section.
 - getEvent() : StopwatchEvent
 - Returns a specific event by name.
 - getEvents() : array<string|int, StopwatchEvent>
 - Returns the events from this section.
 - getId() : string|null
 - isEventStarted() : bool
 - Checks if the event was started.
 - lap() : StopwatchEvent
 - Stops then restarts an event.
 - open() : self
 - Creates or re-opens a child section.
 - setId() : $this
 - Sets the session identifier.
 - startEvent() : StopwatchEvent
 - Starts an event.
 - stopEvent() : StopwatchEvent
 - Stops an event.
 
Methods
__construct()
    public
                    __construct([float|null $origin = null ][, bool $morePrecision = false ]) : mixed
    Parameters
- $origin : float|null = null
 - 
                    
Set the origin of the events in this section, use null to set their origin to their start time
 - $morePrecision : bool = false
 - 
                    
If true, time is stored as float to keep the original microsecond precision
 
get()
Returns the child section.
    public
                    get(string $id) : self|null
    Parameters
- $id : string
 
Return values
self|nullgetEvent()
Returns a specific event by name.
    public
                    getEvent(string $name) : StopwatchEvent
    Parameters
- $name : string
 
Tags
Return values
StopwatchEventgetEvents()
Returns the events from this section.
    public
                    getEvents() : array<string|int, StopwatchEvent>
    Return values
array<string|int, StopwatchEvent>getId()
    public
                    getId() : string|null
    Return values
string|nullisEventStarted()
Checks if the event was started.
    public
                    isEventStarted(string $name) : bool
    Parameters
- $name : string
 
Return values
boollap()
Stops then restarts an event.
    public
                    lap(string $name) : StopwatchEvent
    Parameters
- $name : string
 
Tags
Return values
StopwatchEventopen()
Creates or re-opens a child section.
    public
                    open(string|null $id) : self
    Parameters
- $id : string|null
 - 
                    
Null to create a new section, the identifier to re-open an existing one
 
Return values
selfsetId()
Sets the session identifier.
    public
                    setId(string $id) : $this
    Parameters
- $id : string
 
Return values
$thisstartEvent()
Starts an event.
    public
                    startEvent(string $name, string|null $category) : StopwatchEvent
    Parameters
- $name : string
 - $category : string|null
 
Return values
StopwatchEventstopEvent()
Stops an event.
    public
                    stopEvent(string $name) : StopwatchEvent
    Parameters
- $name : string