Index: trunk/phase3/includes/debug/Debug.php |
— | — | @@ -200,7 +200,7 @@ |
201 | 201 | 'function' => $function, |
202 | 202 | 'master' => (bool) $isMaster, |
203 | 203 | 'time' > 0.0, |
204 | | - '_start' => wfTime(), |
| 204 | + '_start' => microtime( true ), |
205 | 205 | ); |
206 | 206 | |
207 | 207 | return count( self::$query ) - 1; |
— | — | @@ -216,7 +216,7 @@ |
217 | 217 | return; |
218 | 218 | } |
219 | 219 | |
220 | | - self::$query[$id]['time'] = wfTime() - self::$query[$id]['_start']; |
| 220 | + self::$query[$id]['time'] = microtime( true ) - self::$query[$id]['_start']; |
221 | 221 | unset( self::$query[$id]['_start'] ); |
222 | 222 | } |
223 | 223 | |
— | — | @@ -257,7 +257,7 @@ |
258 | 258 | $debugInfo = array( |
259 | 259 | 'mwVersion' => $wgVersion, |
260 | 260 | 'phpVersion' => PHP_VERSION, |
261 | | - 'time' => wfTime() - $wgRequestTime, |
| 261 | + 'time' => microtime( true ) - $wgRequestTime, |
262 | 262 | 'log' => self::$log, |
263 | 263 | 'debugLog' => self::$debug, |
264 | 264 | 'queries' => self::$query, |
Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -1056,8 +1056,7 @@ |
1057 | 1057 | |
1058 | 1058 | // Get total page request time and only show pages that longer than |
1059 | 1059 | // $wgProfileLimit time (default is 0) |
1060 | | - $now = wfTime(); |
1061 | | - $elapsed = $now - $wgRequestTime; |
| 1060 | + $elapsed = microtime( true ) - $wgRequestTime; |
1062 | 1061 | if ( $elapsed <= $wgProfileLimit ) { |
1063 | 1062 | return; |
1064 | 1063 | } |
— | — | @@ -1560,8 +1559,7 @@ |
1561 | 1560 | function wfReportTime() { |
1562 | 1561 | global $wgRequestTime, $wgShowHostnames; |
1563 | 1562 | |
1564 | | - $now = wfTime(); |
1565 | | - $elapsed = $now - $wgRequestTime; |
| 1563 | + $elapsed = microtime( true ) - $wgRequestTime; |
1566 | 1564 | |
1567 | 1565 | return $wgShowHostnames |
1568 | 1566 | ? sprintf( '<!-- Served by %s in %01.3f secs. -->', wfHostname(), $elapsed ) |
Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -431,9 +431,9 @@ |
432 | 432 | |
433 | 433 | while ( $n-- && false != ( $job = Job::pop() ) ) { |
434 | 434 | $output = $job->toString() . "\n"; |
435 | | - $t = -wfTime(); |
| 435 | + $t = - microtime( true ); |
436 | 436 | $success = $job->run(); |
437 | | - $t += wfTime(); |
| 437 | + $t += microtime( true ); |
438 | 438 | $t = round( $t * 1000 ); |
439 | 439 | if ( !$success ) { |
440 | 440 | $output .= "Error: " . $job->getLastError() . ", Time: $t ms\n"; |
Index: trunk/phase3/includes/WikiPage.php |
— | — | @@ -2861,10 +2861,10 @@ |
2862 | 2862 | $text = $rev->getText(); |
2863 | 2863 | } |
2864 | 2864 | |
2865 | | - $time = - wfTime(); |
| 2865 | + $time = - microtime( true ); |
2866 | 2866 | $this->parserOutput = $wgParser->parse( $text, $this->page->getTitle(), |
2867 | 2867 | $this->parserOptions, true, true, $this->revid ); |
2868 | | - $time += wfTime(); |
| 2868 | + $time += microtime( true ); |
2869 | 2869 | |
2870 | 2870 | # Timing hack |
2871 | 2871 | if ( $time > 3 ) { |