Not logged in
Log in now
Create an account
Subscribe to LWN
Pencil, Pencil, and Pencil
Dividing the Linux desktop
LWN.net Weekly Edition for June 13, 2013
A report from pgCon 2013
Little things that matter in language design
I imagine the NASDAQ people might also have a problem with this.
The leap second bug
Posted Jul 2, 2012 19:55 UTC (Mon) by cmccabe (guest, #60281)
I guess maybe you should be using CLOCK_MONOTONIC then? That is what it's for-- monotonic time.
Posted Jul 4, 2012 6:27 UTC (Wed) by butlerm (subscriber, #13312)
Posted Jul 4, 2012 10:03 UTC (Wed) by cmccabe (guest, #60281)
Having your 1 second mutex timedwait last for an hour because someone set the wall clock time back an hour, on the other hand, is not useful. Having your 1 second wait take 2 seconds because of a leap second is not useful.
Assuming that wall-clock time is properly synchronized across all nodes in a distributed system is usually not a good idea. It introduces operational complexity and more things to go wrong. And even the best maintained, properly synchronized clocks aren't usually really all that synchronized.
What we have here is a bad default, unfortunately. Most timeouts should not be in terms of wall-clock time-- ideally, none, except for calendar programs and similar.
Posted Jul 5, 2012 3:03 UTC (Thu) by dirtyepic (subscriber, #30178)
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds