One less variable assignment in timer_start and timer_start. props hakre fixes #12389

git-svn-id: http://svn.automattic.com/wordpress/trunk@13436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-02-26 19:09:29 +00:00
parent ab6e21f6fb
commit 90a8933105
1 changed files with 4 additions and 6 deletions

View File

@ -179,8 +179,7 @@ function wp_maintenance() {
function timer_start() { function timer_start() {
global $timestart; global $timestart;
$mtime = explode( ' ', microtime() ); $mtime = explode( ' ', microtime() );
$mtime = $mtime[1] + $mtime[0]; $timestart = $mtime[1] + $mtime[0];
$timestart = $mtime;
return true; return true;
} }
@ -212,8 +211,7 @@ function timer_stop( $display = 0, $precision = 3 ) { // if called like timer_st
global $timestart, $timeend; global $timestart, $timeend;
$mtime = microtime(); $mtime = microtime();
$mtime = explode( ' ', $mtime ); $mtime = explode( ' ', $mtime );
$mtime = $mtime[1] + $mtime[0]; $timeend = $mtime[1] + $mtime[0];
$timeend = $mtime;
$timetotal = $timeend - $timestart; $timetotal = $timeend - $timestart;
$r = ( function_exists( 'number_format_i18n' ) ) ? number_format_i18n( $timetotal, $precision ) : number_format( $timetotal, $precision ); $r = ( function_exists( 'number_format_i18n' ) ) ? number_format_i18n( $timetotal, $precision ) : number_format( $timetotal, $precision );
if ( $display ) if ( $display )