mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
Fixed warning on TickScheduler thread
This commit is contained in:
parent
8a89aee75d
commit
266b78aa31
@ -74,7 +74,7 @@ class TickScheduler extends \Thread{
|
|||||||
$this->tickMeasure = (int) ((($time = microtime(true)) - $tickTime) * 1000000);
|
$this->tickMeasure = (int) ((($time = microtime(true)) - $tickTime) * 1000000);
|
||||||
$tickTime = $time;
|
$tickTime = $time;
|
||||||
$sleepTime = $this->sleepTime * ($this->sleepTime / max($this->sleepTime, $this->tickMeasure));
|
$sleepTime = $this->sleepTime * ($this->sleepTime / max($this->sleepTime, $this->tickMeasure));
|
||||||
usleep($sleepTime - 100); //Remove a few ms for processing
|
usleep((int) $sleepTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user