def _loop_and_run_scheduled_events(self):
    with self._work_ready_condition:
      while not self._quit_event.is_set():
        now = time.time()
        while self._queue and self._queue[0].eta <= now:
          event = heapq.heappop(self._queue)
          if not event.cancelled:
            # Only remove uncancelled events because when an Event is cancelled,
            # its entry in _key_to_events is replaced with the replacement
            # Event.
            if event.key:
              del self._key_to_events[event.key]
            self._work_ready_condition.release()
            self._thread_pool.submit(event.run)
            self._work_ready_condition.acquire()
          now = time.time()
        if self._queue:
          self._work_ready_condition.wait(now - self._queue[0].eta)
        else:
          self._work_ready_condition.wait()
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/scheduled_executor.py/ScheduledExecutor._loop_and_run_scheduled_events/swapped operands of `-`