Changeset 4174
- Timestamp:
- 09/07/2006 11:26:52 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
wp-includes/functions.php (modified) (1 diff)
-
wp-settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r4165 r4174 292 292 ob_start('ob_gzhandler'); 293 293 } 294 }295 296 297 // functions to count the page generation time (from phpBB2)298 // ( or just any time between timer_start() and timer_stop() )299 300 function timer_stop($display = 0, $precision = 3) { //if called like timer_stop(1), will echo $timetotal301 global $timestart, $timeend;302 $mtime = microtime();303 $mtime = explode(' ',$mtime);304 $mtime = $mtime[1] + $mtime[0];305 $timeend = $mtime;306 $timetotal = $timeend-$timestart;307 if ( $display )308 echo number_format($timetotal,$precision);309 return $timetotal;310 294 } 311 295 -
trunk/wp-settings.php
r4160 r4174 59 59 $timestart = $mtime; 60 60 return true; 61 } 62 63 function timer_stop($display = 0, $precision = 3) { //if called like timer_stop(1), will echo $timetotal 64 global $timestart, $timeend; 65 $mtime = microtime(); 66 $mtime = explode(' ',$mtime); 67 $mtime = $mtime[1] + $mtime[0]; 68 $timeend = $mtime; 69 $timetotal = $timeend-$timestart; 70 if ( $display ) 71 echo number_format($timetotal,$precision); 72 return $timetotal; 61 73 } 62 74 timer_start();
Note: See TracChangeset
for help on using the changeset viewer.