[LinuxPPS] Recommendation / Re: Stats & architectures

Bernhard Schiffner bernhard at schiffner-limbach.de
Tue Mar 18 09:29:15 CET 2008


Am Dienstag, 18. März 2008 00:06 schrieb clemens at dwf.com:
...
> > Linuxpps uses getnstimeofday() so a nanosecond time stamp is
> > available.
>
> I hate to break it to you, but if you look at the kernel code,
> getnstimeofday is a dmy routine,- it just multiplies the us value by
> 1000 and returns it.  It does NO interpolation.
>
> That DOES mean that you dont have to change code when a REAL ns clock
> becomes available, but thats about it...

Once I used  getnstimeofday() for some debugging. The readout showed the 
full 10^-9 resolution and no visible *1000 steps. NTPD was not active this 
time.
From this time on I was a beliver in increased numerical resolution 
provided by this call.

Can you prove this on your machine please?
(Which clocksoure is used?)

Do you see an easy way to determine getnstimeofday() "grain"?

--------
By writing this
I did:
echo tsc > /sys/devices/system/clocksource/clocksource0/current_clocksource
(Was a PIIM-CPU!)
I did
/etc/init.d/ntp stop to see raw values

BUT:
I'am today not sure, if someting _remained_ (unchanged, but not zero) in 
the system masking the easy to detect *1000 figures.

What's your opinion please?

TIA!
Bernhard



More information about the LinuxPPS mailing list