def WaitUntilStateShutdown(self, timeout_sec=_SIMULATOR_SHUTDOWN_TIMEOUT_SEC):
    'Waits until the simulator state becomes SHUTDOWN.\n\n    Args:\n      timeout_sec: int, timeout of waiting simulator state for becoming SHUTDOWN\n        in seconds.\n\n    Raises:\n      ios_errors.SimError: when it is timeout to wait the simulator state\n          becomes SHUTDOWN.\n    '
    start_time = time.time()
    while ((start_time + timeout_sec) >= time.time()):
        if (self.GetSimulatorState() == ios_constants.SimState.SHUTDOWN):
            return
        time.sleep(_SIM_CHECK_STATE_INTERVAL_SEC)
    raise ios_errors.SimError(('Timeout to wait for simulator shutdown in %ss.' % timeout_sec))
Waits until the simulator state becomes SHUTDOWN.

Args:
  timeout_sec: int, timeout of waiting simulator state for becoming SHUTDOWN
    in seconds.

Raises:
  ios_errors.SimError: when it is timeout to wait the simulator state
      becomes SHUTDOWN.
def WaitUntilStateShutdown(self, timeout_sec=_SIMULATOR_SHUTDOWN_TIMEOUT_SEC):
    'Waits until the simulator state becomes SHUTDOWN.\n\n    Args:\n      timeout_sec: int, timeout of waiting simulator state for becoming SHUTDOWN\n        in seconds.\n\n    Raises:\n      ios_errors.SimError: when it is timeout to wait the simulator state\n          becomes SHUTDOWN.\n    '
    start_time = time.time()
    while ((start_time + timeout_sec) >= time.time()):
        if (self.GetSimulatorState() == ios_constants.SimState.SHUTDOWN):
            return
        time.sleep(_SIM_CHECK_STATE_INTERVAL_SEC)
    raise ios_errors.SimError(('Timeout to wait for simulator shutdown in %ss.' % timeout_sec))