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

HRTime\StopWatch::getLastElapsedTime

PHP function Edit on GitHub ✎

(PECL hrtime >= 0.4.3)

Get elapsed time for the last interval

Description

HRTime\StopWatch::getLastElapsedTime([int $unit]): float

Get elapsed time for the previously closed interval.

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/getlastelapsedtime.xml · from the official PHP manual (php/doc-en)