Custom sleep function. Built-in ``time.sleep()`` is not precise/depends on the OS, see https://stackoverflow.com/q/1133857/4316405.
(duration, get_now=time.perf_counter)
| 31 | |
| 32 | |
| 33 | def sleep(duration, get_now=time.perf_counter): |
| 34 | """ |
| 35 | Custom sleep function. Built-in ``time.sleep()`` is not precise/depends on |
| 36 | the OS, see https://stackoverflow.com/q/1133857/4316405. |
| 37 | """ |
| 38 | now = get_now() |
| 39 | end = now + duration |
| 40 | while now < end: |
| 41 | now = get_now() |
| 42 | |
| 43 | |
| 44 | def make_search_route( |
no outgoing calls