Removed unneded check
Simplified Condition.wait_for
Simplified code in Queue.get and Queue.put
Use loop.time() to get the time
Simplified socket.snedall logic