minor improvement

This commit is contained in:
Steffen Schröder 2014-05-07 17:56:52 +02:00
parent f920a11ae9
commit 5fdb738886

View File

@ -369,9 +369,7 @@ class ManiaControl implements CommandListener, TimerListener {
} catch (TransportException $e) { } catch (TransportException $e) {
$this->log("Connection interrupted!"); $this->log("Connection interrupted!");
// TODO remove // TODO remove
if ($this->errorHandler) { $this->errorHandler->handleException($e, false);
$this->errorHandler->handleException($e, false);
}
$this->quit($e->getMessage()); $this->quit($e->getMessage());
} }
@ -380,8 +378,7 @@ class ManiaControl implements CommandListener, TimerListener {
// Yield for next tick // Yield for next tick
$loopEnd = microtime(true); $loopEnd = microtime(true);
$sleepTime = (int)(2500 - ($loopEnd - $loopStart) * 1000000);
$sleepTime = (int)(2000 - ($loopEnd - $loopStart) * 1000000);
if ($sleepTime > 0) { if ($sleepTime > 0) {
usleep($sleepTime); usleep($sleepTime);
} }