Closed GrahamCampbell closed 4 years ago
the high resolution time module is not bundled with php according to https://www.php.net/manual/en/hrtime.installation.php
The hrtime
function (https://www.php.net/manual/en/function.hrtime.php) is not the same as the hrtime extension (which provides an OOP timing library). The function is a core function added to PHP 7.3. If it is not available (if and only if the PHP version is less than 7.3), we fallback to the symfony polyfill I already required (line 18 composer.json). As far as I'm aware, it is not possible to compile PHP 7.3+ without the hrtime function. :)
great, thanks for the explanation. i somehow assumed the function would be part of the extension - learned something new today :-D
🎉 Thanks for your super speedy reviews. :)
well, thanks for all the work you put into the libraries! :+1:
hrtime
to avoid negative timing when the system clock changes (which can happen quite a lot - my Macbook seems to change the system clock by a few seconds more than once an hour)Tests pass: https://github.com/GrahamCampbell/logger-plugin/runs/866077906.