[ntp:questions] Re: kernel precision on Linux

David L. Mills mills at udel.edu
Wed Feb 4 00:51:23 UTC 2004


Please don't monkey with systime.c in the sources here. As time goes on,
many icky fingers have splintered the code and its dependencies on
machine type, etc. What you do specific to Linux, of course, cares me

The nanokernel and ntpd that leaves here works happily with either
microseconds or nanoseconds. I don't know why anybody would want to use
gettimeofday(), which as you point out is microseconds only. Various
modern systems have nanosecond equivalents, but unhappily not all
support the same syscalls. The automeisters of the Corps have done a
good job finding these icky differences and, as far as I know, every
system with a nanosecond clock will get the appropriate syscalls.


Ulrich Windl wrote:
> Piotr Trojanek <ptrojane at mion.elka.pw.edu.pl> writes:
> [...]
> > Even running ntpd on linux nanokernel ntpd knows only about microsecond
> > precision, which comes from gettimeofday() syscall. I'm not sure if it is a
> > bug, but I patched my linux NTP sources with this patch:
> >
> > http://home.elka.pw.edu.pl/~ptrojane/systime.diff
> It seems your patch may be useful to non-Linux systems as well IMHO.
> >
> > and it works quite well (on nanokernel). Now it use nano-precision for all
> > the timestamps (including NTP requests).
> [...]
> Regards,
> Ulrich

More information about the questions mailing list