summaryrefslogtreecommitdiffstats
path: root/system/core/Benchmark.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-04-27 11:17:56 +0200
committerAndrey Andreev <narf@bofh.bg>2012-04-27 11:17:56 +0200
commit721c77fcf347751895623514fb2e4c89390afa67 (patch)
treecb1f7b5f7688d9090e9a90960a17d188ceef8083 /system/core/Benchmark.php
parent871a6f979e4291365c40247158ccde8fccca3ae5 (diff)
parentced2c9ab41450cb632c042730604111ec2a24e1f (diff)
Merge upstream branch
Diffstat (limited to 'system/core/Benchmark.php')
-rwxr-xr-xsystem/core/Benchmark.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php
index f6b634deb..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();
// --------------------------------------------------------------------
@@ -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);
}
// --------------------------------------------------------------------