Re: Time set backward



In article <dpohfm$k5p$1@xxxxxxxxxxxxxx>,
David L. Mills <mills@xxxxxxxx> wrote:

>If POSIX has no way to discipline the clock frequency, the clock
>frequency is not disciplined and the platform not reliably
>synchronized.

POSIX makes no claim about whether the clock has any connection
whatsoever with reality. POSIX must provide for a wide variety of
environments, including non-networked machines with free-running
clocks that may be set from a repair technician's wristwatch once
every three years. As I said, it's only a fluke that the
clock_settime() interface is even in POSIX -- prior to the Real Time
Extensions work there simply was no way to set the clock at all, just
as there still is no way to create a new user, reboot the system, or
perform any number of other administrative operations. POSIX is just
an API standard; it does not try to include every possible function an
operating system needs to have.

I tried to interest people in an interface which would at least allow
applications to *tell* whether the clock was synchronized with
anything, but unfortunately timekeeping in POSIX is a deep quagmire,
and any time anyone brings up any changes to the timekeeping
interfaces, they are immediately overwhelmed with demands to fix the
Y2038 Problem, the Leap Second Problem, the struct timespec problem,
the Time Zone Thread-Safety Problem, and innumerable other pet
defects. I am certainly not going to spend all my spare time dealing
with that, and I don't know anyone else with the stomach for it.

-GAWollman

--
Garrett A. Wollman | As the Constitution endures, persons in every
wollman@xxxxxxxxxxxxx | generation can invoke its principles in their own
Opinions not those | search for greater freedom.
of MIT or CSAIL. | - A. Kennedy, Lawrence v. Texas, 539 U.S. 558 (2003)
.



Relevant Pages

  • Re: [PATCH 1/7] cpu-timers: high-resolution CPU clocks for POSIX clock_* syscalls
    ... The clock used is that provided by ... The ABI encoding of clockid_t for CPU time clocks is changed. ... > Note that the small-integer constants are not supported by the kernel ABI. ... Otherwise the API will take only some of the posix ...
    (Linux-Kernel)
  • Re: what do the values of "clocks ticks" and "CLOCK_PER_SEC" represent?
    ... POSIX defined value) is the time resolution the values returned ... that this is also not a standard-C but POSIX function;-).They ... be confused with the clock rate of the processor. ... This leads to what I would call wasting 10000 increments in the typical case where clockhas a physical resolution of 0.010 second. ...
    (comp.lang.c)
  • Custom Condition Variable to Extend Pthreads for Linux
    ... clock for either a relative-time timeout or and absolute-time timeout. ... Real-time extensions for POSIX do allow for a clock-id on ... condition variable initialization, but I don't think they support ...
    (comp.programming.threads)
  • Re: Unix Time and Leap Seconds
    ... deliberately re-initializes the system clock counter of the ... Anything different from this is a deliberate choice of the ... System administration issues are outside the scope of both POSIX and the ... specified in the standard, the CLOCK_MONOTONIC clock may jump around ...
    (comp.unix.programmer)
  • Re: Time set backward
    ... If POSIX has no way to discipline the clock frequency, the clock frequency is not disciplined and the platform not reliably synchronized. ... The reality is that standards monkeys are neither engineers nor physicists and don't understand the physical basis of the technology. ...
    (comp.protocols.time.ntp)