public function updatePing() {
        $this->socket->send(new A2SINFOPacket());
        $startTime = microtime(true);
        $this->socket->getReply();
        $endTime = microtime(true);
        $this->ping = intval(round(($endTime - $startTime) * 1000));

        return $this->ping;
    }