mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
Use time_sleep_until() instead of usleep(), improved thread kill
This commit is contained in:
@@ -2186,7 +2186,7 @@ class Server{
|
||||
private function tickProcessor(){
|
||||
while($this->isRunning){
|
||||
$this->tick();
|
||||
usleep((int) max(1, ($this->nextTick - microtime(true)) * 1000000 - 2000));
|
||||
time_sleep_until($this->nextTick - 0.001);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user