From 6d402cef28545b859590df0e7cbe7edc2acb6e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=22Gubihe?= Date: Fri, 21 Jan 2022 10:28:07 +0100 Subject: [PATCH] microtime as float (#502) --- engine/database/connect.php | 5 ++--- engine/footer.php | 6 ++---- engine/init.php | 4 +--- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/engine/database/connect.php b/engine/database/connect.php index 87b1ed2..dc23896 100644 --- a/engine/database/connect.php +++ b/engine/database/connect.php @@ -7,9 +7,8 @@ if (!function_exists("elapsedTime")) { if ($l_start === false) global $l_start; if ($l_time === false) global $l_time; - $l_time = explode(' ', microtime()); - $l_finish = $l_time[1] + $l_time[0]; - return round(($l_finish - $l_start), 4); + $l_time = microtime(true); + return round(($l_time - $l_start), 4); } } diff --git a/engine/footer.php b/engine/footer.php index 6cefc6c..8dbdf04 100644 --- a/engine/footer.php +++ b/engine/footer.php @@ -1,11 +1,9 @@ \ No newline at end of file + diff --git a/engine/init.php b/engine/init.php index d4fdc5d..6fb7485 100644 --- a/engine/init.php +++ b/engine/init.php @@ -1,8 +1,6 @@