Set a specific wait time later used with `wait` :param seconds: wait time in seconds :param reconnect: True if a reconnect would avoid wait time
(self, seconds, strict=False)
| 307 | self.wantReconnect = bool(reconnect) |
| 308 | |
| 309 | def set_wait(self, seconds, strict=False): |
| 310 | """ |
| 311 | Set a specific wait time later used with `wait` |
| 312 | |
| 313 | :param seconds: wait time in seconds |
| 314 | :param reconnect: True if a reconnect would avoid wait time |
| 315 | """ |
| 316 | wait_time = float(seconds) |
| 317 | |
| 318 | if wait_time < 0: |
| 319 | return False |
| 320 | |
| 321 | old_wait_until = self.pyfile.waitUntil |
| 322 | new_wait_until = time.time() + wait_time + float(not strict) |
| 323 | |
| 324 | self.log_debug("WAIT set to timestamp %f" % new_wait_until, |
| 325 | "Previous waitUntil: %f" % old_wait_until) |
| 326 | |
| 327 | self.pyfile.waitUntil = new_wait_until |
| 328 | return True |
| 329 | |
| 330 | def wait(self, seconds=None, reconnect=None): |
| 331 | """ |
no test coverage detected