Changeset 12698
- Timestamp:
- 11/06/08 19:28:19 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.2/lib/config/sfApplicationConfiguration.class.php
r12503 r12698 97 97 $configCache = $this->getConfigCache(); 98 98 99 // in debug mode, start global timer 100 if ($this->isDebug() && !sfWebDebugPanelTimer::isStarted()) 101 { 102 sfWebDebugPanelTimer::startTime(); 103 } 104 99 105 // required core classes for the framework 100 106 if (!sfConfig::get('sf_debug') && !sfConfig::get('sf_test') && !self::$coreLoaded) branches/1.2/lib/debug/sfWebDebugPanelTimer.class.php
r11164 r12698 19 19 class sfWebDebugPanelTimer extends sfWebDebugPanel 20 20 { 21 static protected 22 $startTime = null; 23 21 24 /** 22 25 * Constructor. … … 71 74 } 72 75 76 static public function startTime() 77 { 78 self::$startTime = microtime(true); 79 } 80 81 static public function isStarted() 82 { 83 return !is_null(self::$startTime); 84 } 85 73 86 protected function getTotalTime() 74 87 { 75 return isset($_SERVER['REQUEST_TIME']) ? sprintf('%.0f', (microtime(true) - $_SERVER['REQUEST_TIME']) * 1000) : 0;88 return !is_null(self::$startTime) ? sprintf('%.0f', (microtime(true) - self::$startTime) * 1000) : 0; 76 89 } 77 90 }

