浏览代码

Add REQUEST_TIME_FLOAT
compatible with php 5.4 and useful for benchmarks

Joanhey 6 年之前
父节点
当前提交
001d8b13d6
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Protocols/Http.php

+ 2 - 1
Protocols/Http.php

@@ -109,7 +109,8 @@ class Http
             'CONTENT_TYPE'         => '',
             'REMOTE_ADDR'          => '',
             'REMOTE_PORT'          => '0',
-            'REQUEST_TIME'         => \time()
+            'REQUEST_TIME'         => \time(),
+            'REQUEST_TIME_FLOAT'   => \microtime(true) //compatible php5.4
         );
 
         // Parse headers.