User time.perf_counter instead of time.monotonic?
zpz opened this issue · comments
Zepu Zhang commented
Please see https://www.webucator.com/article/python-clocks-explained/
time.perf_counter
has a resolution 4e-7 sec, whereas time.monotonic
has a resolution 0.15 sec.
I noticed at least the unix lock implementation uses monotonic
. That could lead to waits longer than needed, and make small values of poll_interval
not beneficial (while giving user the illusion that they have fine-grained control).
Maybe use perf_counter
instead of monotonic
?
Bernát Gábor commented
Feel free to put in a PR for it.
Zepu Zhang commented
created a PR