Backport c3e66e0adc1a0d5ccc2b48dc2ec44e51f5c5383d to 3.6

This commit is contained in:
Dylan K. Taylor 2019-03-09 19:09:05 +00:00
parent 414104851a
commit 1d810f8aeb

View File

@ -2450,6 +2450,9 @@ class Server{
$level->doTick($currentTick);
$tickMs = (microtime(true) - $levelTime) * 1000;
$level->tickRateTime = $tickMs;
if($tickMs >= 50){
$this->getLogger()->debug(sprintf("World \"%s\" took too long to tick: %gms (%g ticks)", $level->getName(), $tickMs, round($tickMs / 50, 2)));
}
if($this->autoTickRate){
if($tickMs < 50 and $level->getTickRate() > $this->baseTickRate){