Nanosecond timing under Linux

Any suggestions for getting nanosecond (or at least, sub-microsecond)
timing under Linux? The best I’ve Googled have been platform-dependent
assembly timers.

http://www.ncsa.uiuc.edu/UserInfo/Resources/Hardware/IA64LinuxCluster/Doc/timing.html#linuxasm

http://www.google.com/url?
sa=U&start=13&q=http://www.cs.rpi.edu/~hollingd/comporg/notes/timing/timing.pdf&e=10401

This high-resolution timer also looks promising:

Are there any others that I haven’t found?

Thanks,
-Lee

On Friday 12 May 2006 08:28, Lee P. wrote:

Any suggestions for getting nanosecond (or at least, sub-microsecond)
timing under Linux? The best I’ve Googled have been platform-dependent
assembly timers.

I know FreeBSD has [get]nanotime() but I don’t know how portable that is
(probably not at all).

Also, if you are using this to tag USRP streams you are probably better
off
finding some way to sync the start of acquisition to something and then
counting samples. That way it’s “free”.

(at work our acquisition system syncs to GPS 1PPS and if we need mucho
accuracy we use GPS disciplined Rubidium clocks driving a PLL)