mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Fixed warning on TickScheduler thread
This commit is contained in:
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user