mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Use other things instead of array_shift
This commit is contained in:
parent
5277555d33
commit
1dbbf08f1b
2 changed files with 7 additions and 10 deletions
|
|
@ -324,7 +324,7 @@ class PocketMinecraftServer{
|
|||
public function tick(){
|
||||
$time = microtime(true);
|
||||
if($this->lastTick <= ($time - 0.05)){
|
||||
array_shift($this->tickMeasure);
|
||||
unset($this->tickMeasure[key($this->tickMeasure)]);
|
||||
$this->tickMeasure[] = $this->lastTick = $time;
|
||||
$this->tickerFunction($time);
|
||||
$this->trigger("server.tick", $time);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue