MCPcopy Create free account
hub / github.com/PyVRP/PyVRP / sleep

Function sleep

tests/helpers.py:33–41  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

31
32
33def 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
44def make_search_route(

Callers 2

test_after_max_runtimeFunction · 0.90
test_after_max_runtimeFunction · 0.90

Calls

no outgoing calls

Tested by 2

test_after_max_runtimeFunction · 0.72
test_after_max_runtimeFunction · 0.72