Make WordPress Core


Ignore:
Timestamp:
09/07/2006 11:26:52 PM (20 years ago)
Author:
ryan
Message:

timer_stop() wanted to be near timer_start().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r4165 r4174  
    292292        ob_start('ob_gzhandler');
    293293    }
    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 $timetotal
    301     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;
    310294}
    311295
Note: See TracChangeset for help on using the changeset viewer.