stanley-king před 9 roky
rodič
revize
a742fb5342
1 změnil soubory, kde provedl 5 přidání a 4 odebrání
  1. 5 4
      mobile/control/control.php

+ 5 - 4
mobile/control/control.php

@@ -25,7 +25,7 @@ class mobileControl
 
     public function __construct()
     {
-        self::$startime = microtime();
+        self::$startime = microtime(true);
 
         Language::read('mobile');
         //分页数处理
@@ -47,7 +47,7 @@ class mobileControl
     }
 
     private static function eclipse_time() {
-        return (microtime() - self::$startime);
+        return (microtime(true) - self::$startime);
     }
 
     protected function check_app_type()
@@ -87,7 +87,8 @@ class mobileControl
                 $msg = errcode::msg($code);
             }
             echo joutput_error($code,$msg,'web') . "<br/>";
-            echo "eclipse_time = " . self::eclipse_time() . "<br/><br/>";
+            $eclipse_time = sprintf("eclipse_time = %.6f <br/><br/>", self::eclipse_time());
+            echo $eclipse_time;
 
             $sqls = Log::sql_log();
             echo "sql count = " . count($sqls) . "<br/><br/>";
@@ -118,7 +119,7 @@ class mobileControl
             echo 'success: return data=<br/>';
             joutput_data($data,'web');
             echo "<br/><br/>";
-            echo "eclipse_time = " . self::eclipse_time() . "<br/><br/>";
+            echo sprintf("eclipse_time = %.6f <br/><br/>", self::eclipse_time());
 
             $sqls = Log::sql_log();
             echo "sql count = " . count($sqls) . "<br/><br/>";