<br><br><div class="gmail_quote">On Wed, Apr 4, 2012 at 11:41 PM, Cameron Simpson <span dir="ltr"><<a href="mailto:cs@zip.com.au">cs@zip.com.au</a>></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 <<a href="mailto:pje@telecommunity.com">pje@telecommunity.com</a>> wrote:<br>
| On Apr 4, 2012 7:28 PM, "Victor Stinner" <<a href="mailto:victor.stinner@gmail.com">victor.stinner@gmail.com</a>> wrote:<br>
| > 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<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'Aprano's algorithm doesn'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>