WordPress.org

Make WordPress Core

Ticket #12389: 12389.patch

File 12389.patch, 1.1 KB (added by hakre, 5 years ago)
  • load.php

     
    178178 */ 
    179179function timer_start() { 
    180180        global $timestart; 
    181         $mtime = explode( ' ', microtime() ); 
    182         $mtime = $mtime[1] + $mtime[0]; 
    183         $timestart = $mtime; 
     181        $mtime     = explode( ' ', microtime() ); 
     182        $timestart = $mtime[1] + $mtime[0]; 
    184183        return true; 
    185184} 
    186185 
     
    209208 * @return float The "second.microsecond" finished time calculation 
    210209 */ 
    211210function timer_stop( $display = 0, $precision = 3 ) { // if called like timer_stop(1), will echo $timetotal 
    212         global $timestart, $timeend; 
    213         $mtime = microtime(); 
    214         $mtime = explode( ' ',$mtime ); 
    215         $mtime = $mtime[1] + $mtime[0]; 
    216         $timeend = $mtime; 
    217         $timetotal = $timeend-$timestart; 
     211        global $timestart, $timeend;     
     212        $mtime     = explode( ' ',microtime() ); 
     213        $timeend   = $mtime[1] + $mtime[0]; 
     214        $timetotal = $timeend - $timestart; 
    218215        $r = ( function_exists( 'number_format_i18n' ) ) ? number_format_i18n( $timetotal, $precision ) : number_format( $timetotal, $precision ); 
    219216        if ( $display ) 
    220217                echo $r;