<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Mar 30, 2012, at 9:32 PM, Guido van Rossum wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Menlo; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><blockquote type="cite"><blockquote type="cite"> - no steps<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">You mean "not adjusted by NTP"? Except CLOCK_MONOTONIC on Linux, no<br></blockquote><blockquote type="cite">monotonic clock is adjusted by NTP. On Linux, there is<br></blockquote><blockquote type="cite">CLOCK_MONOTONIC_RAW, but it is only available on recent Linux kernel<br></blockquote><blockquote type="cite">(2.6.28).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Do you think that it is important to be able to refuse a monotonic<br></blockquote><blockquote type="cite">clock adjusted by NTP? What would be the use case of such truly steady<br></blockquote><blockquote type="cite">clock?<br></blockquote><br>That depends on what NTP can do to the clock. If NTP makes the clock<br>tick *slightly* faster or slower in order to gradually adjust the wall<br>clock, that's fine. If NTP can make it jump wildly forward or even<br>backward, it's no better than time.time(), and we know why (for some<br>purposes) we don't want that.<br></div></span></blockquote></div><br><div>"no steps" means something very specific. It does not mean "not adjusted by NTP".</div><div><br></div><div>In NTP, changing the clock frequency to be slightly faster or slower is called "slewing" (which is done with adjtime()). Jumping by a large amount in a single discrete step is called "stepping" (which is done with settimeofday()). This is sort-of explained by <<a href="http://doc.ntp.org/4.1.2/ntpd.htm">http://doc.ntp.org/4.1.2/ntpd.htm</a>>.</div><div><br></div><div>I think I'm agreeing with Guido here when I say that, personally, my understanding is that slewing is generally desirable (i.e. we should use CLOCK_MONOTONIC, not CLOCK_MONOTONIC_RAW) if one wishes to measure "real" time (and not a time-like object like CPU cycles). This is because the clock on the other end of the NTP connection from you is probably better at keeping time: hopefully that thirty five thousand dollars of Cesium timekeeping goodness is doing <i>something</i> better than your PC's $3 quartz crystal, after all.</div><div><br></div><div>So, slew tends to correct for minor defects in your local timekeeping mechanism, and will compensate for its tendency to go too fast or too slow. By contrast, stepping only happens if your local clock is just set incorrectly and the re-sync delta has more to do with administrative error or failed batteries than differences in timekeeping accuracy.</div><div><br></div><div>-glyph</div><div><br></div></body></html>