Showing content from http://mail.python.org/pipermail/python-dev/attachments/20120405/5f96df5b/attachment.html below:
<br><br><div class="gmail_quote">On Thu, Apr 5, 2012 at 6:34 AM, Victor Stinner <span dir="ltr"><<a href="mailto:victor.stinner@gmail.com">victor.stinner@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2012/4/5 PJ Eby <<a href="mailto:pje@telecommunity.com">pje@telecommunity.com</a>>:<br>
<div class="im">>> More details why it's hard to define such function and why I dropped<br>
>> it from the PEP.<br>
>><br>
>> If someone wants to propose again such function ("monotonic or<br>
>> fallback to system" clock), two issues should be solved:<br>
>><br>
>> - name of the function<br>
>> - description of the function<br>
><br>
> Maybe I missed it, but did anyone ever give a reason why the fallback<br>
> couldn't be to Steven D'Aprano's monotonic wrapper algorithm over the system<br>
> clock? (Given a suitable minimum delta.) That function appeared to me to<br>
> provide a sufficiently monotonic clock for timeout purposes, if nothing<br>
> else.<br>
<br>
<br>
</div><div class="im">Did you read the following section of the PEP?<br>
<a href="http://www.python.org/dev/peps/pep-0418/#working-around-operating-system-bugs" target="_blank">http://www.python.org/dev/peps/pep-0418/#working-around-operating-system-bugs</a><br>
<br>
Did I miss something? If yes, could you write a patch for the PEP please?<br></div></blockquote><div><br></div><div>What's missing is that if you're using a monotonic clock for timeouts, then a monotonically-adjusted system clock can do that, subject to the polling frequency -- it does not break just because the system clock is set backwards; it simply loses time proportional to the frequency with which it is polled.</div>
<div><br></div><div>For timeout purposes in a single process, such a clock is useful. It just isn't suitable for benchmarks, or for interprocess coordination.</div><div><br></div></div>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4