<br><br><div class="gmail_quote">On Wed, Apr 4, 2012 at 11:41 PM, Cameron Simpson <span dir="ltr">&lt;<a href="mailto:cs@zip.com.au">cs@zip.com.au</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div></div><div class="h5">On 04Apr2012 22:23, PJ Eby &lt;<a href="mailto:pje@telecommunity.com">pje@telecommunity.com</a>&gt; wrote:<br>
| On Apr 4, 2012 7:28 PM, &quot;Victor Stinner&quot; &lt;<a href="mailto:victor.stinner@gmail.com">victor.stinner@gmail.com</a>&gt; wrote:<br>
| &gt; More details why it&#39;s hard to define such function and why I dropped<br>
| &gt; it from the PEP.<br>
| &gt;<br>
| &gt; If someone wants to propose again such function (&quot;monotonic or<br>
| &gt; fallback to system&quot; clock), two issues should be solved:<br>
| &gt;<br>
| &gt;  - name of the function<br>
| &gt;  - description of the function<br>
|<br>
| Maybe I missed it, but did anyone ever give a reason why the fallback<br>
| couldn&#39;t be to Steven D&#39;Aprano&#39;s monotonic wrapper algorithm over the<br>
| system clock?  (Given a suitable minimum delta.)  That function appeared to<br>
| me to provide a sufficiently monotonic clock for timeout purposes, if<br>
| nothing else.<br>
<br>
</div></div>It was pointed out (by Nick Coglan I think?) that if the system clock<br>
stepped backwards then a timeout would be extended by at least that<br>
long. For example, code that waited (by polling the synthetic clock)<br>
for 1s could easily wait an hour if the system clock stepped back that<br>
far. Probaby undesirable.<br></blockquote><div><br></div><div>Steven D&#39;Aprano&#39;s algorithm doesn&#39;t do that.  If the system clock steps backwards, it still stepped forward by a specified minimum delta.  The amount of time that a timeout was extended would be a function of the polling frequency, not the presence of absence of backward steps in the underlying clock.</div>
</div>