'Sets the timeout used for waiting output in the current connection.
Read operations that expect some output to appear (`Read Until`, `Read
Until Regexp`, `Read Until Prompt`, `Login`) use this timeout and fail
if the expected output does not appear before this timeout expires.
The ``timeout`` must be given in `time string format`. The old timeout
is returned and can be used to restore the timeout later.
Example:
| ${old} =       | `Set Timeout` | 2 minute 30 seconds |
| `Do Something` |
| `Set Timeout`  | ${old}  |
See `Configuration` section for more information about global and
connection specific configuration.'

def set_timeout(self, timeout):

    self._verify_connection()
    old = self._timeout
    self._set_timeout(timeout)
    return secs_to_timestr(old)
