From b27a4aaabbb68e3e26cdd9f1e58ebd6972e92708 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Tue, 18 Dec 2012 14:35:48 +0100 Subject: [PATCH] Better TPS --- classes/PocketMinecraftServer.class.php | 2 +- classes/Session.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/PocketMinecraftServer.class.php b/classes/PocketMinecraftServer.class.php index bc0b143559..81c6c95840 100644 --- a/classes/PocketMinecraftServer.class.php +++ b/classes/PocketMinecraftServer.class.php @@ -411,7 +411,7 @@ class PocketMinecraftServer extends stdClass{ if($packet !== false){ $this->packetHandler($packet); }else{ - usleep(10000); + usleep(1000); } } } diff --git a/classes/Session.class.php b/classes/Session.class.php index 495cc0b797..ff208a6877 100644 --- a/classes/Session.class.php +++ b/classes/Session.class.php @@ -55,7 +55,7 @@ class Session{ if($time > $this->timeout){ $this->close("timeout"); }else{ - if(count($this->queue) > 0){ + if(!empty($this->queue)){ $cnt = 0; while($cnt < 4){ $p = array_shift($this->queue);