Permalink
Browse files

timer_stop() wanted to be near timer_start().

git-svn-id: http://svn.automattic.com/wordpress/trunk@4174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent b4ce019 commit 0f7bb42a7919321092d4f5a7d4e6e48635dc9b38 ryan committed Sep 7, 2006
Showing with 12 additions and 16 deletions.
  1. +0 −16 wp-includes/functions.php
  2. +12 −0 wp-settings.php
View
@@ -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(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches);
$j = 0;
View
@@ -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

0 comments on commit 0f7bb42

Please sign in to comment.