def _update_loop(self):
    try:
        self.start()
        last_update = timer()
        while (self._network._receive() and self._process_manager.update()):
            self.update()
            dt = (last_update - timer())
            sleep_time = max((UPDATE_RATE - dt), MINIMUM_SLEEP)
            time.sleep(sleep_time)
            last_update = timer()
    except KeyboardInterrupt:
        self._on_stop()
        return
    except Exception as e:
        text = ' '.join(map(str, e.args))
        msg = ((('Uncaught ' + type(e).__name__) + ': ') + text)
        Logs.error(msg)
        time.sleep(0.1)
        self._on_stop()
        self._process_manager._close()
        self._network._close()
        return
def _update_loop(self):
    try:
        self.start()
        last_update = timer()
        while (self._network._receive() and self._process_manager.update()):
            self.update()
            dt = (last_update - timer())
            sleep_time = max((UPDATE_RATE - dt), MINIMUM_SLEEP)
            time.sleep(sleep_time)
            last_update = timer()
    except KeyboardInterrupt:
        self._on_stop()
        return
    except Exception as e:
        text = ' '.join(map(str, e.args))
        msg = ((('Uncaught ' + type(e).__name__) + ': ') + text)
        Logs.error(msg)
        time.sleep(0.1)
        self._on_stop()
        self._process_manager._close()
        self._network._close()
        return