Changeset 172 for trunk/lib/ScriptTimer.inc.php
- Timestamp:
- Jun 15, 2006 7:59:45 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/ScriptTimer.inc.php
r136 r172 18 18 function stop($name='default') 19 19 { 20 if (!isset($this->_timing_stop_times[$name]) || !isset($this->_timing_cumulative_times[$name])) { 21 $this->_timing_stop_times[$name] = null; 22 $this->_timing_cumulative_times[$name] = null; 23 } 20 24 $this->_timing_stop_times[$name] = explode(' ', microtime()); 21 25 $this->_timing_cumulative_times[$name] += $this->getTime($name); … … 25 29 { 26 30 if (!isset($this->_timing_start_times[$name])) { 27 31 return 0; 28 32 } 29 33 if (!isset($this->_timing_stop_times[$name])) { … … 48 52 } 49 53 50 $this->_timing_cumulative_times[ "TOTAL"] = array_sum($this->_timing_cumulative_times);54 $this->_timing_cumulative_times['TOTAL'] = array_sum($this->_timing_cumulative_times); 51 55 52 56 echo '<pre>';
Note: See TracChangeset
for help on using the changeset viewer.