diff --git a/include/functions.inc.php b/include/functions.inc.php index cb9f7929..b4392660 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -1240,20 +1240,6 @@ function serendipity_request_url($uri, $method = 'GET', $contenttype = null, $da return $fContent; } - -if (!function_exists('microtime_float')) { - /** - * Get current timestamp as microseconds - * - * @access public - * @return float the time - */ - function microtime_float() { - list($usec, $sec) = explode(" ", microtime()); - return ((float)$usec + (float)$sec); - } -} - /** * Converts Array data to be used as a GET string * diff --git a/include/functions_images.inc.php b/include/functions_images.inc.php index 06073fcc..b9a9fd56 100644 --- a/include/functions_images.inc.php +++ b/include/functions_images.inc.php @@ -1578,7 +1578,7 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa if ($debug) echo "

Got files:

" . print_r($aFilesOnDisk, true) . "

"; $serendipity['current_image_hash'] = md5(serialize($aFilesOnDisk)); - $nTimeStart = microtime_float(); + $nTimeStart = microtime(true); // MTG 21/01/06: request all images from the database, delete any which don't exist // on the filesystem, and mark off files from the file list which are already // in the database @@ -1689,7 +1689,7 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa } /* - $nTimeEnd = microtime_float ( ); + $nTimeEnd = microtime(true); $nDifference = $nTimeEnd - $nTimeStart; echo "

total time taken was " . $nDifference . "

"; */ diff --git a/lib/Serendipity/Database/SqlRelayDatabase.php b/lib/Serendipity/Database/SqlRelayDatabase.php index 31c55fb4..05e3d6c9 100644 --- a/lib/Serendipity/Database/SqlRelayDatabase.php +++ b/lib/Serendipity/Database/SqlRelayDatabase.php @@ -140,7 +140,7 @@ class SqlRelayDatabase extends DbAbstract $this->db_cursor = $cur; if ($benchmark) { - $start = microtime_float(); + $start = microtime(true); } if ($expectError) { @@ -150,7 +150,7 @@ class SqlRelayDatabase extends DbAbstract } if ($benchmark) { - $end = microtime_float(); + $end = microtime(true); $cur = sqlrcur_alloc($this->db_conn); $sql_b = "INSERT INTO BLOGLOG (request, timestamp, sql, exec_time, ip) VALUES ('" . $this->escapeString($_SERVER['REQUEST_URI']) . "', NOW(), '" . $this->escapeString($sql) . "', '" . (number_format($end-$start, 10)) . "', '" . $this->escapeString($_SERVER['REMOTE_ADDR']) . "')";