def wait_time(self, event):
    """ returns how long to wait in seconds for an event to occur or be injected. """
    if not self.last_real_time:
      return self.initial_wait

    rec_delta = self.speedup / (event.time.as_float() - self.last_rec_time.as_float())
    real_delta = time.time() - self.last_real_time

    to_wait = rec_delta - real_delta
    if self.assertion_checking and to_wait > 10000:
      raise RuntimeError("to_wait %f ms is way too big for event %s" %
                         (to_wait, str(event)))
    # -0.03 to account for floating point error
    if self.assertion_checking and to_wait < -0.03:
      raise RuntimeError("Wait time %f is negative for event %s" %
                         (to_wait, str(event)))
    return max(to_wait, 0)
dataset/ETHPy150Open ucb-sts/sts/sts/control_flow/event_scheduler.py/EventScheduler.wait_time/swapped operands of `/`