X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fmctest.php;h=a97d2e1296c81f2feb4245ff50c3f9d85a9546ad;hb=78da7f163744dec7b48240a019c2ccd4ec266c4e;hp=da49e55c966923c30fba888e60dee49510494c12;hpb=bd4484b72f323fed599ee99c53f2bef8ef881a0c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/mctest.php b/maintenance/mctest.php index da49e55c96..a97d2e1296 100644 --- a/maintenance/mctest.php +++ b/maintenance/mctest.php @@ -78,7 +78,7 @@ class McTest extends Maintenance { $set = 0; $incr = 0; $get = 0; - $time_start = $this->microtime_float(); + $time_start = microtime( true ); for ( $i = 1; $i <= $iterations; $i++ ) { if ( $mcc->set( "test$i", $i ) ) { $set++; @@ -95,21 +95,11 @@ class McTest extends Maintenance { $get++; } } - $exectime = $this->microtime_float() - $time_start; + $exectime = microtime( true ) - $time_start; $this->output( " set: $set incr: $incr get: $get time: $exectime", $server ); } } - - /** - * Return microtime() as a float - * @return float - */ - private function microtime_float() { - list( $usec, $sec ) = explode( " ", microtime() ); - - return ( (float)$usec + (float)$sec ); - } } $maintClass = "McTest";