Files
peace-maker fb35a123b4 Fix some global type hint errors (#2736)
* Fix some global type hint errors

Errors in global scope should be fixed before we're enabling strict mode in mypy and tackle the local problems.

* Remove pwnlib.util.pairwise since it's in itertools now

pairwise was added to itertools itself in 3.10.
https://docs.python.org/3/library/itertools.html#itertools.pairwise
2026-05-28 17:16:27 +02:00

21 lines
428 B
Python

"""Improved replacements for standard functions
"""
import time as __time
def sleep(n: float) -> None:
"""sleep(n)
Replacement for :func:`time.sleep()`, which does not return if a signal is received.
Arguments:
n (float): Number of seconds to sleep.
"""
end = __time.time() + n
while True:
left = end - __time.time()
if left <= 0:
break
__time.sleep(left)