Messages in this thread | | | Date | Tue, 23 Feb 1999 12:30:08 +0100 | From | Thomas Sailer <> | Subject | Re: 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/
| |