diff --git a/wp-includes/functions.php b/wp-includes/functions.php index cfeccfdd46..0f9b7daafc 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -293,22 +293,6 @@ function gzip_compression() { } } - -// functions to count the page generation time (from phpBB2) -// ( or just any time between timer_start() and timer_stop() ) - -function timer_stop($display = 0, $precision = 3) { //if called like timer_stop(1), will echo $timetotal - global $timestart, $timeend; - $mtime = microtime(); - $mtime = explode(' ',$mtime); - $mtime = $mtime[1] + $mtime[0]; - $timeend = $mtime; - $timetotal = $timeend-$timestart; - if ( $display ) - echo number_format($timetotal,$precision); - return $timetotal; -} - function make_url_footnote($content) { preg_match_all('/(.+?)<\/a>/', $content, $matches); $j = 0; diff --git a/wp-settings.php b/wp-settings.php index c112f8d1e1..4bbccf6cfe 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -59,6 +59,18 @@ function timer_start() { $timestart = $mtime; return true; } + +function timer_stop($display = 0, $precision = 3) { //if called like timer_stop(1), will echo $timetotal + global $timestart, $timeend; + $mtime = microtime(); + $mtime = explode(' ',$mtime); + $mtime = $mtime[1] + $mtime[0]; + $timeend = $mtime; + $timetotal = $timeend-$timestart; + if ( $display ) + echo number_format($timetotal,$precision); + return $timetotal; +} timer_start(); // Change to E_ALL for development/debugging