2276225819 8 年之前
父节点
当前提交
95dc8a94ce
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      Events/Select.php

+ 4 - 1
Events/Select.php

@@ -143,7 +143,10 @@ class Select implements EventInterface
                 $run_time = microtime(true) + $fd;
                 $this->_scheduler->insert($timer_id, -$run_time);
                 $this->_eventTimer[$timer_id] = array($func, (array)$args, $flag, $fd);
-                $this->_selectTimeout = ($run_time - time()) * 1000000;  
+                $select_timeout = ($run_time - microtime(true)) * 1000000;
+                if( $this->_selectTimeout > $select_timeout ){ 
+                    $this->_selectTimeout = $select_timeout;   
+                }  
                 return $timer_id;
         }