Class StopwatchEvent
Represents an Event managed by Stopwatch.
Methods summary
public
|
#
__construct( float $origin, string $category = null )
Constructor.
Parameters
- $origin
float $origin The origin time in milliseconds
- $category
string $category The event category
Throws
|
public
string
|
#
getCategory( )
Gets the category.
Returns
string The category
|
public
integer
|
#
getOrigin( )
Gets the origin.
Returns
integer The origin in milliseconds
|
public
Symfony\Component\Stopwatch\StopwatchEvent
|
#
start( )
Starts a new event period.
Starts a new event period.
Returns
|
public
Symfony\Component\Stopwatch\StopwatchEvent
|
#
stop( )
Stops the last started event period.
Stops the last started event period.
Returns
Throws
|
public
Symfony\Component\Stopwatch\StopwatchEvent
|
#
lap( )
Stops the current period and then starts a new one.
Stops the current period and then starts a new one.
Returns
|
public
|
#
ensureStopped( )
Stops all non already stopped periods.
Stops all non already stopped periods.
|
public
Symfony\Component\Stopwatch\StopwatchPeriod[]
|
|
public
integer
|
#
getStartTime( )
Gets the relative time of the start of the first period.
Gets the relative time of the start of the first period.
Returns
integer The time (in milliseconds)
|
public
integer
|
#
getEndTime( )
Gets the relative time of the end of the last period.
Gets the relative time of the end of the last period.
Returns
integer The time (in milliseconds)
|
public
integer
|
#
getDuration( )
Gets the duration of the events (including all periods).
Gets the duration of the events (including all periods).
Returns
integer The duration (in milliseconds)
|
public
integer
|
#
getMemory( )
Gets the max memory usage of all periods.
Gets the max memory usage of all periods.
Returns
integer The memory usage (in bytes)
|
protected
float
|
#
getNow( )
Return the current time relative to origin.
Return the current time relative to origin.
Returns
float Time in ms
|