Start the timeout clock, used during a connect() attempt :raises urllib3.exceptions.TimeoutStateError: if you attempt to start a timer that has been started already.
(self)
| 200 | return Timeout(connect=self._connect, read=self._read, total=self.total) |
| 201 | |
| 202 | def start_connect(self) -> float: |
| 203 | """Start the timeout clock, used during a connect() attempt |
| 204 | |
| 205 | :raises urllib3.exceptions.TimeoutStateError: if you attempt |
| 206 | to start a timer that has been started already. |
| 207 | """ |
| 208 | if self._start_connect is not None: |
| 209 | raise TimeoutStateError("Timeout timer has already been started.") |
| 210 | self._start_connect = time.monotonic() |
| 211 | return self._start_connect |
| 212 | |
| 213 | def get_connect_duration(self) -> float: |
| 214 | """Gets the time elapsed since the call to :meth:`start_connect`. |