Documentation

StopwatchPeriod
in package

Represents an Period for an Event.

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

$end  : mixed
$memory  : mixed
$start  : mixed
__construct()  : mixed
__toString()  : string
getDuration()  : int|float
Gets the time spent in this period.
getEndTime()  : int|float
Gets the relative time of the end of the period.
getMemory()  : int
Gets the memory usage.
getStartTime()  : int|float
Gets the relative time of the start of the period.

Properties

Methods

__construct()

public __construct(int|float $start, int|float $end[, bool $morePrecision = false ]) : mixed
Parameters
$start : int|float

The relative time of the start of the period (in milliseconds)

$end : int|float

The relative time of the end of the period (in milliseconds)

$morePrecision : bool = false

If true, time is stored as float to keep the original microsecond precision

Return values
mixed

getDuration()

Gets the time spent in this period.

public getDuration() : int|float
Return values
int|float

The period duration (in milliseconds)

getEndTime()

Gets the relative time of the end of the period.

public getEndTime() : int|float
Return values
int|float

The time (in milliseconds)

getMemory()

Gets the memory usage.

public getMemory() : int
Return values
int

The memory usage (in bytes)

getStartTime()

Gets the relative time of the start of the period.

public getStartTime() : int|float
Return values
int|float

The time (in milliseconds)

Search results