In function “hrte”, made it use “bc” math only if available

This commit is contained in:
pezcurrel 2023-12-27 01:00:14 +01:00
parent 5e34f0f1f3
commit 1c2d9eb4b1

View file

@ -849,7 +849,10 @@ function strip($str,$uri) {
}
function hrte($bt) {
return bcdiv(bcsub(hrtime(true),$bt,9),1000000000,9);
if (function_exists('bcdiv'))
return bcdiv(bcsub(hrtime(true),$bt,9),1000000000,9);
else
return (hrtime(true)-$bt)/1000000000;
}
function tquery($query,$line) {