API: Give block details along with errors
[lhc/web/wiklou.git] / maintenance / mctest.php
index da49e55..a97d2e1 100644 (file)
@@ -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";