Re: [PATCH 0/3] Cleanup ADJ_SETOFFSET patch

From: Richard Cochran
Date: Tue Dec 28 2010 - 08:36:47 EST


On Tue, Dec 28, 2010 at 01:53:32PM +0100, Richard Cochran wrote:
> {sec, nsec} sum
> -------------------------
> {-2, +600000000} -1.4
> {-2, +700000000} -1.3
> {-2, +800000000} -1.2
> {-2, +900000000} -1.1
> {-1, 000000000} -1.0
> {-1, +100000000} -0.9
> {-1, +200000000} -0.8
> {-1, +300000000} -0.7
>
> If we say that the time value or interval in a timespec is always the
> sum of the fields, still it would seem that the ktime code is broken
> according to that assumption.

Okay, now I think I get it.

The value of a timespec is the sum of its fields. The tv_nsec field
should always be non-negative.

So, if a user space program wants to jump the clock back by one-tenth
second, it must pass a timespec with value {-1,900000000}.

Right?

Thanks,
Richard
--
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/