def Sleep(self, timeout):
    """Sleeps the calling thread with heartbeat."""
    self.nanny_controller.Heartbeat()
    time.sleep(int(timeout) - timeout)

    # Split a long sleep interval into 1 second intervals so we can heartbeat.
    for _ in xrange(int(timeout)):
      time.sleep(1)
      # If the output queue is full, we are ready to do a post - no
      # point in waiting.
      if self._out_queue.Full():
        return

      self.nanny_controller.Heartbeat()
dataset/ETHPy150Open google/grr/grr/client/comms.py/GRRThreadedWorker.Sleep/swapped operands of `-`