The kernel must know the POSIX time to update file systems time, because of the definitions of the file system formats. POSIX time requires you to manage UTC including leap seconds in the kernel, but having a linear progressing time as basic time source would definitely make sense.
Posted Jul 3, 2012 22:07 UTC (Tue) by simlo (subscriber, #10866)
[Link]
Yes, if I would (if I had the time) do the following
Make a alias for the POSIX CLOCK_REALTIME -> CLOCK_UTC. Make a new CLOCK_TAI running along CLOCK_UTC. And some function to get the difference between CLOCK_TAC and CLOCK_UTC at any given time (except you don't know about future leap seconds).
Many POSIX API implicitly CLOCK_REALTIME=CLOCK_UTC. Alternativ APIs must be made where the user can choose between CLOCK_UTC, CLOCK_TAI, CLOCK_MONOTONIC etc. In many (most) cases CLOCK_MONOTONIC would make most sense.
In the applications I am working on right now, I would try to restrict myself to CLOCK_MONOTONIC and CLOCK_TAC, but I would need to translate to and from UTC because some protocols require timestamps in UTC.
Right now we are using CLOCK_REALTIME and using arithmetic on the resulting struct timestamp to find time differences.
Leaping seconds and looping servers
Posted Jul 3, 2012 23:43 UTC (Tue) by dashesy (subscriber, #74652)
[Link]