PHP Class Profiler\Timer

Show file Open project: loic-sharma/profiler

Protected Properties

Property Type Description
$endTime double The time at which the timer was ended.
$startTime double The time at which the timer was started.

Public Methods

Method Description
__construct ( double | null $startTime = null ) : void Start the timer.
end ( double | null $time = null ) : void End the timer.
getElapsedTime ( ) : double Get the amount of time (in milliseconds) that elapsed while the timer was turned on.

Method Details

__construct() public method

Start the timer.
public __construct ( double | null $startTime = null ) : void
$startTime double | null
return void

end() public method

End the timer.
public end ( double | null $time = null ) : void
$time double | null
return void

getElapsedTime() public method

Get the amount of time (in milliseconds) that elapsed while the timer was turned on.
public getElapsedTime ( ) : double
return double

Property Details

$endTime protected property

The time at which the timer was ended.
protected double $endTime
return double

$startTime protected property

The time at which the timer was started.
protected double $startTime
return double