From 23ddeba64d87df8d4202d7c780c93669b0dd6041 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Wed, 4 Oct 2006 22:00:26 +0000 Subject: [PATCH] allow timer_stop() to use number_format() when returning. Props mdawaffe and nbachiyski. fixes #991 git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4344 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-footer.php | 2 +- wp-includes/functions.php | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/wp-admin/admin-footer.php b/wp-admin/admin-footer.php index e660be287f..88e69ae483 100644 --- a/wp-admin/admin-footer.php +++ b/wp-admin/admin-footer.php @@ -2,7 +2,7 @@ diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 9a2eb6a87c..c1a59e9ee2 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -844,9 +844,10 @@ function timer_stop($display = 0, $precision = 3) { //if called like timer_stop( $mtime = $mtime[1] + $mtime[0]; $timeend = $mtime; $timetotal = $timeend-$timestart; + $r = number_format($timetotal, $precision); if ( $display ) - echo number_format($timetotal,$precision); - return $timetotal; + echo $r; + return $r; } function weblog_ping($server = '', $path = '') { @@ -2508,4 +2509,4 @@ function wp_die($message, $title = '') { die(); } -?> \ No newline at end of file +?>