function getCpuTime($ru=null) {
if ( function_exists( 'getrusage' ) ) {
- if ( $ru == null )
+ if ( $ru == null ) {
$ru = getrusage();
+ }
return ($ru['ru_utime.tv_sec'] + $ru['ru_stime.tv_sec'] + ($ru['ru_utime.tv_usec'] +
$ru['ru_stime.tv_usec']) * 1e-6);
} else {
/* If argument is passed, it assumes that it is dual-format time string, returns proper float time value */
function getTime($time=null) {
- if ($time==null)
+ if ($time==null) {
return microtime(true);
+ }
list($a,$b)=explode(" ",$time);
return (float)($a+$b);
}
$text = $dbw->tableName( 'text' );
if ( $fix ) {
- $dbw->lockTables( $dbw, 'text' );
+ $dbw->lockTables( $dbw, 'text', __METHOD__ );
}
$this->output( "\nChecking for pages whose page_latest links are incorrect... (this may take a while on a large wiki)\n" );