mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Backport c3e66e0adc
to 3.6
This commit is contained in:
@ -2450,6 +2450,9 @@ class Server{
|
|||||||
$level->doTick($currentTick);
|
$level->doTick($currentTick);
|
||||||
$tickMs = (microtime(true) - $levelTime) * 1000;
|
$tickMs = (microtime(true) - $levelTime) * 1000;
|
||||||
$level->tickRateTime = $tickMs;
|
$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($this->autoTickRate){
|
||||||
if($tickMs < 50 and $level->getTickRate() > $this->baseTickRate){
|
if($tickMs < 50 and $level->getTickRate() > $this->baseTickRate){
|
||||||
|
Reference in New Issue
Block a user