php8.5
Home/ Manual/ hrtime / hrtime-stopwatch/ HRTime\StopWatch::getElapsedTime

HRTime\StopWatch::getElapsedTime

PHP function Edit on GitHub ✎

(PECL hrtime >= 0.4.3)

Get elapsed time for all intervals

Description

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.

Source: reference/hrtime/hrtime-stopwatch/getelapsedtime.xml · from the official PHP manual (php/doc-en)