MCPcopy Index your code
hub / github.com/python/cpython / random_sleep

Function random_sleep

Lib/test/test_free_threading/test_generators.py:15–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14
15def random_sleep():
16 delay_us = random.randint(50, 100)
17 time.sleep(delay_us * 1e-6)
18
19def random_string():
20 return ''.join(random.choice('0123456789ABCDEF') for _ in range(10))

Callers 2

set_gen_nameFunction · 0.85
set_gen_qualnameFunction · 0.85

Calls 2

randintMethod · 0.80
sleepMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…