All notable changes are documented in this file using the Keep a CHANGELOG principles.
SebastianBergmann\Timer\Exception now correctly extends \Throwablecomposer.json from ^7.3 || ^8.0 to >=7.3SebastianBergmann\Timer\Duration::fromMicroseconds() was changed from int to floatSebastianBergmann\Timer\Duration::fromNanoseconds() was changed from int to floatSebastianBergmann\Timer\Duration::asNanoseconds() was changed from int to floathrtime() returns float instead of int)Duration value object for encapsulating a duration with nanosecond granularityResourceUsageFormatter object for formatting resource usage with option to explicitly pass a duration (instead of looking at the unreliable $_SERVER['REQUEST_TIME_FLOAT'] variable)Timer are no longer staticTimer::stop() now returns a Duration value objectDuration and ResourceUsageFormatter has been removed from TimerTimer::timeSinceStartOfRequest() no longer tries $_SERVER['REQUEST_TIME'] when $_SERVER['REQUEST_TIME_FLOAT'] is not available ($_SERVER['REQUEST_TIME_FLOAT'] was added in PHP 5.4 and this library requires PHP 7.3)$_SERVER['REQUEST_TIME_FLOAT'] is not set or is not of type floatTimer::timeSinceStartOfRequest() now raises an exception if $_SERVER['REQUEST_TIME_FLOAT'] does not contain a float (or $_SERVER['REQUEST_TIME'] does not contain an int)hrtime()Timer::stop() is different than before (this reverts using hrtime() instead of microtime())Timer::secondsToShortTimeString() as alternative to Timer::secondsToTimeString()Timer::start() and Timer::stop() now use hrtime() (high resolution monotonic timer) instead of microtime()Timer::timeSinceStartOfRequest() now uses Timer::secondsToShortTimeString() for time formattingTimer::secondsToTimeString() resultresourceUsage()resourceUsage()