From 90a8933105c38ff43c26b1bc7c71904b981a9f3f Mon Sep 17 00:00:00 2001 From: nacin Date: Fri, 26 Feb 2010 19:09:29 +0000 Subject: [PATCH] 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 --- wp-includes/load.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/wp-includes/load.php b/wp-includes/load.php index bc651379f..68cace949 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -179,8 +179,7 @@ function wp_maintenance() { function timer_start() { global $timestart; $mtime = explode( ' ', microtime() ); - $mtime = $mtime[1] + $mtime[0]; - $timestart = $mtime; + $timestart = $mtime[1] + $mtime[0]; return true; } @@ -211,10 +210,9 @@ function timer_start() { 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; + $mtime = explode( ' ', $mtime ); + $timeend = $mtime[1] + $mtime[0]; + $timetotal = $timeend - $timestart; $r = ( function_exists( 'number_format_i18n' ) ) ? number_format_i18n( $timetotal, $precision ) : number_format( $timetotal, $precision ); if ( $display ) echo $r;