original_docstring: 
          Reduce timeout from *timeout* variable.
          Uses in multi commands functions which should have general timeout.
  
          Note:
              Minimal reducing to 1 second
  
          Args:
              start_time (float): Time when function was started
              timeout (int): Timeout to reduce
  
          Returns:
               timeout, time: reduced timeout and current time
  
          .. code-block:: python
  
              from time import time
  
              def test(self, timeout=10):
                  start_time = time()
                  self.action_with_timeout(timeout)
                  timeout, start_time = self._reduce_timeout(start_time, timeout)
                  self.other_action_with_timeout(timeout)
          
docstring: Reduce timeout from *timeout* variable.
  Uses in multi commands functions which should have general timeout.
  
  Minimal reducing to 1 second
docstring_tokens: Reduce timeout from * timeout * variable . Uses in multi commands functions which should have general timeout . Minimal reducing to 1 second
code: def _reduce_timeout(start_time, timeout):
          """
          Reduce timeout from *timeout* variable.
          Uses in multi commands functions which should have general timeout.
  
          Note:
              Minimal reducing to 1 second
  
          Args:
              start_time (float): Time when function was started
              timeout (int): Timeout to reduce
  
          Returns:
               timeout, time: reduced timeout and current time
  
          .. code-block:: python
  
              from time import time
  
              def test(self, timeout=10):
                  start_time = time()
                  self.action_with_timeout(timeout)
                  timeout, start_time = self._reduce_timeout(start_time, timeout)
                  self.other_action_with_timeout(timeout)
          """
          if timeout is None:
              return timeout, time()
  
          new_timeout = timeout - (time() - start_time)
          return new_timeout if new_timeout > 0 else 1, time()
code_tokens: def _reduce_timeout ( start_time , timeout ) : if timeout is None : return timeout , time ( ) new_timeout = timeout - ( time ( ) - start_time ) return new_timeout if new_timeout > 0 else 1 , time ( )
short_docstring: Reduce timeout from *timeout* variable.
short_docstring_tokens: Reduce timeout from * timeout * variable .
comment: """
          Reduce timeout from *timeout* variable.
          Uses in multi commands functions which should have general timeout.
  
          Note:
              Minimal reducing to 1 second
  
          Args:
              start_time (float): Time when function was started
              timeout (int): Timeout to reduce
  
          Returns:
               timeout, time: reduced timeout and current time
  
          .. code-block:: python
  
              from time import time
  
              def test(self, timeout=10):
                  start_time = time()
                  self.action_with_timeout(timeout)
                  timeout, start_time = self._reduce_timeout(start_time, timeout)
                  self.other_action_with_timeout(timeout)
          """