code: def _write_socket(self):
          
          while True:
              now = time.time()
              if self._connected and (self._last_sync + SYNC_AFTER) < now:
                  self._queue.put(request_packet(MSG_TIME))
                  self._last_sync = now
              if not self._queue.empty():
                  self._socket.send(self._queue.get())
docs: Pass messages from queue to socket.