summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-04-23 12:10:19 +0200
committerAndrey Andreev <narf@bofh.bg>2012-04-23 12:10:19 +0200
commit6f3fd0fe5e86f50422ab9398a33f7351986634b0 (patch)
treeb5bda67045ecedac94ef2f8a53c6537e772a761b /system/core
parentb3f774bbbb81293326136e3e13297c3b8d49dfa4 (diff)
parentab3cab5a8f2afdd45ec8c6c365e43722781e54e6 (diff)
Merge pull request #1271 from dixy/develop-microtime
Use parameter 'get_as_float' of microtime()
Diffstat (limited to 'system/core')
-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..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