HRTime\StopWatch::getElapsedTime

(PECL hrtime >= 0.4.3)

HRTime\StopWatch::getElapsedTimeGet elapsed time for all intervals

Description

public HRTime\StopWatch::getElapsedTime(int $unit = ?): float

Get elapsed time for all the previously closed intervals.

Parameters

unit

Time unit represented by a HRTime\Unit constant. Default is HRTime\Unit::SECOND.

Return Values

Returns float indicating elapsed time.