From ab3cab5a8f2afdd45ec8c6c365e43722781e54e6 Mon Sep 17 00:00:00 2001 From: dixy Date: Sat, 21 Apr 2012 00:58:00 +0200 Subject: Use parameter 'get_as_float' of microtime() --- system/core/Benchmark.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'system/core/Benchmark.php') diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php index f6b634deb..39027e809 100755 --- a/system/core/Benchmark.php +++ b/system/core/Benchmark.php @@ -61,7 +61,7 @@ class CI_Benchmark { */ public function mark($name) { - $this->marker[$name] = microtime(); + $this->marker[$name] = microtime(TRUE); } // -------------------------------------------------------------------- @@ -93,13 +93,10 @@ class CI_Benchmark { if ( ! isset($this->marker[$point2])) { - $this->marker[$point2] = microtime(); + $this->marker[$point2] = microtime(TRUE); } - list($sm, $ss) = explode(' ', $this->marker[$point1]); - list($em, $es) = explode(' ', $this->marker[$point2]); - - return number_format(($em + $es) - ($sm + $ss), $decimals); + return number_format($this->marker[$point2] - $this->marker[$point1], $decimals); } // -------------------------------------------------------------------- @@ -122,4 +119,4 @@ class CI_Benchmark { } /* End of file Benchmark.php */ -/* Location: ./system/core/Benchmark.php */ +/* Location: ./system/core/Benchmark.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 48a7fbbeb53e82e9298036d40c42ec2564699ed0 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Mon, 23 Apr 2012 11:58:16 -0400 Subject: Use tabs to separate class properties --- system/core/Benchmark.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/core/Benchmark.php') diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php index 39027e809..c17e95a19 100755 --- a/system/core/Benchmark.php +++ b/system/core/Benchmark.php @@ -46,7 +46,7 @@ class CI_Benchmark { * * @var array */ - public $marker = array(); + public $marker = array(); // -------------------------------------------------------------------- @@ -119,4 +119,4 @@ class CI_Benchmark { } /* End of file Benchmark.php */ -/* Location: ./system/core/Benchmark.php */ \ No newline at end of file +/* Location: ./system/core/Benchmark.php */ -- cgit v1.2.3-24-g4f1b