Use other things instead of array_shift

This commit is contained in:
Shoghi Cervantes Pueyo 2013-05-16 17:30:34 +02:00
parent 5277555d33
commit 1dbbf08f1b
2 changed files with 7 additions and 10 deletions

View file

@ -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);