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