Changeset 129
- Timestamp:
- 03/04/08 00:38:36 (10 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Stagehand/TestRunner/AlterationMonitor.php
r127 r129 54 54 { 55 55 56 // {{{ constants 57 58 const SCAN_INTERVAL_MIN = 5; 59 60 // }}} 56 61 // {{{ properties 57 62 … … 84 89 '!^#.+#$!' 85 90 ); 91 private $_scanInterval = self::SCAN_INTERVAL_MIN; 86 92 87 93 /**#@-*/ … … 121 127 Waiting for changes in the directory [ {$this->_directory} ] ... 122 128 "; 129 123 130 $this->_waitForChanges(); 124 131 … … 167 174 168 175 while (true) { 169 sleep( 5);176 sleep($this->_scanInterval); 170 177 clearstatcache(); 171 178 172 179 try { 173 180 $this->_currentElements = array(); 181 $startTime = time(); 174 182 $this->_collectElements($this->_directory); 183 $endTime = time(); 184 $elapsedTime = $endTime - $startTime; 185 if ($elapsedTime > self::SCAN_INTERVAL_MIN) { 186 $this->_scanInterval = $elapsedTime; 187 } 175 188 } catch (Stagehand_TestRunner_Exception $e) { 176 189 return;
