code: def wait(self, timeout):
          
          self.condition.acquire()
          self.condition.wait(timeout // 1000)
          self.condition.release()
docs: Calling thread waits for a given number of milliseconds or
          until notified.