Re: clock_gettime_ns

From: Andy Lutomirski
Date: Mon Sep 09 2013 - 13:47:26 EST


On Wed, Sep 4, 2013 at 6:22 PM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> I think it would be crazy encoding UTC with a non-POSIX scheme.

The whole point is to find a good way to return the time that solves
the problems with the POSIX scheme. Some of the problems, as I see
them, are:

- Performance: seconds + nanoseconds is expensive to compute and
expensive to use.
- Leap seconds, part 1: Times like 23:59:60.1 are not representable.
- Leap seconds, part 2: The limited leap-second support that already
exists (via the NTP APIs) is so obscure that it's frequently broken.
- Offsets between clocks can't be read without using complicated
calls like adjtimex.

I think that coming up with something that's both non-POSIX and
half-arsed is a bad idea, but doing something that's non-POSIX and
well thought-through could be valuable.

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/