diff --git a/src/HotUpdate/HotUpdateProcess.php b/src/HotUpdate/HotUpdateProcess.php index 99b7c52..54081e8 100644 --- a/src/HotUpdate/HotUpdateProcess.php +++ b/src/HotUpdate/HotUpdateProcess.php @@ -105,7 +105,7 @@ public function run(Worker $worker): void // 检测间隔延时 if ($this->timespan > 0) { - $time = (int) ($this->timespan - (microtime(true) - $time)); + $time = $this->timespan - (microtime(true) - $time); if ($time <= 0) { $time = 10000; @@ -119,7 +119,7 @@ public function run(Worker $worker): void { $time = 10000; } - usleep($time); + usleep((int) $time); $time = microtime(true); // 检查文件是否有修改 if ($monitor->isChanged())