Example #1
0
def set_no_flow_timeout() -> None:
    """Disables flow timeout (it means wait forever).

  Returns:
    Nothing.
  """
    _timeout.set_timeout(None)
Example #2
0
def set_flow_timeout(timeout: int) -> None:
    """Sets flow timeout.

  Args:
    timeout: timeout in seconds. 0 means not to wait.

  Returns:
    Nothing.
  """
    if timeout is None:
        raise ValueError('Timeout is not specified')
    if timeout < 0:
        raise ValueError('Timeout cannot be negative')
    _timeout.set_timeout(timeout)