lkml.org 
[lkml]   [1999]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: gettimeofday is not monotonic
Alan Cox wrote:
>
> > I think that gettimeofday should be guaranteed to be monotonic.
>
> Yes and no. It should indeed be monotonic for normal uses. There is a specific
> SMP problem right now that Ingo had some patches for (if you have a CPU setup
> where the TSC's are not in sync which a few boards do).

Lately I had problems with baycom_ser_fdx, which uses do_gettimeofday
for the decoding. These problems could be explained by do_gettimeofday
tv_usec
field anomalies.

The next day however I tried to prove this and worte a test program,
but the time looked quite normal at that time.

> However on a system data change by root or when xntpd jumps the clock because
> its too far out it won't be monotonic. So yes Linux is broken somewhere but
> xclock has a minor silly buglet too

If that happens infrequently, it's not a problem for baycom_ser_fdx
(the worst that can happen is it looses a packet), but otherwise
I need a different high resolution clock (resolution less than 100us).
What should I use for this?

Tom

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

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.038 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site