Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -911,20 +911,15 @@ |
912 | 912 | * @return string |
913 | 913 | */ |
914 | 914 | function wfDebugTimer() { |
915 | | - global $wgDebugTimestamps; |
| 915 | + global $wgDebugTimestamps, $wgRequestTime; |
| 916 | + |
916 | 917 | if ( !$wgDebugTimestamps ) { |
917 | 918 | return ''; |
918 | 919 | } |
919 | | - static $start = null; |
920 | 920 | |
921 | | - if ( $start === null ) { |
922 | | - $start = microtime( true ); |
923 | | - $prefix = "\n$start"; |
924 | | - } else { |
925 | | - $prefix = sprintf( "%6.4f", microtime( true ) - $start ); |
926 | | - } |
927 | | - $mem = sprintf( "%5.1fM", ( memory_get_usage( true ) / (1024*1024) ) ); |
928 | | - return "$prefix $mem " ; |
| 921 | + $prefix = sprintf( "%6.4f", microtime( true ) - $wgRequestTime ); |
| 922 | + $mem = sprintf( "%5.1fM", ( memory_get_usage( true ) / ( 1024 * 1024 ) ) ); |
| 923 | + return "$prefix $mem "; |
929 | 924 | } |
930 | 925 | |
931 | 926 | /** |