summaryrefslogtreecommitdiffstats
path: root/system/libraries/Benchmark.php
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-21 21:44:22 +0200
committeradmin <devnull@localhost>2006-10-21 21:44:22 +0200
commite334c472fb4be44feec3a73402fc4a2b062cbfc0 (patch)
tree553f17d67e7ef652016ec85b2a576bb2210f0ff8 /system/libraries/Benchmark.php
parentbd6bee75dd26ade1c8d9cfd104bb913065797c59 (diff)
Diffstat (limited to 'system/libraries/Benchmark.php')
-rw-r--r--system/libraries/Benchmark.php62
1 files changed, 31 insertions, 31 deletions
diff --git a/system/libraries/Benchmark.php b/system/libraries/Benchmark.php
index 44c32a874..66e8a24cf 100644
--- a/system/libraries/Benchmark.php
+++ b/system/libraries/Benchmark.php
@@ -7,12 +7,12 @@
* @package CodeIgniter
* @author Rick Ellis
* @copyright Copyright (c) 2006, pMachine, Inc.
- * @license http://www.codeignitor.com/user_guide/license.html
+ * @license http://www.codeignitor.com/user_guide/license.html
* @link http://www.codeigniter.com
* @since Version 1.0
* @filesource
*/
-
+
// ------------------------------------------------------------------------
/**
@@ -43,18 +43,18 @@ class CI_Benchmark {
* @param string $name name of the marker
* @return void
*/
- function mark($name)
- {
- $this->marker[$name] = microtime();
- }
+ function mark($name)
+ {
+ $this->marker[$name] = microtime();
+ }
// --------------------------------------------------------------------
/**
* Calculates the time difference between two marked points.
*
- * If the first parameter is empty this function instead returns the
- * {elapsed_time} pseudo-variable. This permits the full system
+ * If the first parameter is empty this function instead returns the
+ * {elapsed_time} pseudo-variable. This permits the full system
* execution time to be shown in a template. The output class will
* swap the real value for this variable.
*
@@ -64,28 +64,28 @@ class CI_Benchmark {
* @param integer the number of decimal places
* @return mixed
*/
- function elapsed_time($point1 = '', $point2 = '', $decimals = 4)
- {
- if ($point1 == '')
- {
+ function elapsed_time($point1 = '', $point2 = '', $decimals = 4)
+ {
+ if ($point1 == '')
+ {
return '{elapsed_time}';
- }
-
- if ( ! isset($this->marker[$point1]))
- {
- return '';
- }
-
- if ( ! isset($this->marker[$point2]))
- {
- $this->marker[$point2] = microtime();
- }
-
- list($sm, $ss) = explode(' ', $this->marker[$point1]);
- list($em, $es) = explode(' ', $this->marker[$point2]);
-
- return number_format(($em + $es) - ($sm + $ss), $decimals);
- }
+ }
+
+ if ( ! isset($this->marker[$point1]))
+ {
+ return '';
+ }
+
+ if ( ! isset($this->marker[$point2]))
+ {
+ $this->marker[$point2] = microtime();
+ }
+
+ list($sm, $ss) = explode(' ', $this->marker[$point1]);
+ list($em, $es) = explode(' ', $this->marker[$point2]);
+
+ return number_format(($em + $es) - ($sm + $ss), $decimals);
+ }
// --------------------------------------------------------------------
@@ -93,8 +93,8 @@ class CI_Benchmark {
* Memory Usage
*
* This function returns the {memory_usage} pseudo-variable.
- * This permits it to be put it anywhere in a template
- * without the memory being calculated until the end.
+ * This permits it to be put it anywhere in a template
+ * without the memory being calculated until the end.
* The output class will swap the real value for this variable.
*
* @access public