Time less than target fix

This commit is contained in:
Shoghi Cervantes 2015-05-03 23:20:40 +02:00
parent 0ddf396b08
commit 563f7404fe
No known key found for this signature in database
GPG Key ID: 78464DB0A7837F89

View File

@ -2186,7 +2186,10 @@ class Server{
private function tickProcessor(){
while($this->isRunning){
$this->tick();
time_sleep_until($this->nextTick - 0.001);
$next = $this->nextTick - 0.001;
if($next > microtime(true)){
time_sleep_until($next);
}
}
}