r54959 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54958‎ | r54959 | r54960 >
Date:18:48, 13 August 2009
Author:brion
Status:deferred
Tags:
Comment:
this isn't the dark ages; let microtime() do the floatization for us
Modified paths:
  • /trunk/extensions/LocalisationUpdate/update.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LocalisationUpdate/update.php
@@ -11,10 +11,7 @@
1212 if ( $argc > 1 && $argv[0] == "verbose" )
1313 $verbose = true;
1414
15 -$mtime = microtime();
16 -$mtime = explode( " ", $mtime );
17 -$mtime = $mtime[1] + $mtime[0];
18 -$starttime = $mtime;
 15+$starttime = microtime( true );
1916
2017 // Prevent the script from timing out
2118 set_time_limit( 0 );
@@ -22,9 +19,6 @@
2320
2421 LocalisationUpdate::updateMessages( $verbose );
2522
26 -$mtime = microtime();
27 -$mtime = explode( " ", $mtime );
28 -$mtime = $mtime[1] + $mtime[0];
29 -$endtime = $mtime;
 23+$endtime = microtime( true );
3024 $totaltime = ( $endtime - $starttime );
3125 print "All done in " . $totaltime . " seconds\n";

Status & tagging log