[ntp:questions] measuring os latency for pps

folkert folkert at vanheusden.com
Tue Aug 25 18:26:02 UTC 2015


> > Not sure if it is interesting for you guys but I wrote a simple program
> > for e.g. Linux (or any other system with the pps api implemented) that
> > listens on a pps source waiting for a pulse and then toggles a gpio
> > pin. That way you can measure the latency introduced by the the kernel
> > when listening from userspace. Note that there's a little extra latency
> > due to the gpio-pin handling.
> > 
> > You can also use it e.g. blink a led :-)
> > 
> > It is on github: https://github.com/flok99/pps2gpio
> 
> You could potentially work out the GPIO latency by activating two GPIO
> pins sequentially instead of just one.  in your code open two pins
> rewrite set_value to take two fd's and then have two write()s inside
> that.  The time delay between the changing states of the two pins would
> give you an approximate value of the latency.

Great suggestion!
I'll add it.


Folkert van Heusden

-- 
Multitail est un outil permettant la visualisation de fichiers de
journalisation et/ou le suivi de l'exécution de commandes. Filtrage,
mise en couleur de mot-clé, fusions, visualisation de différences
(diff-view), etc.  http://www.vanheusden.com/multitail/
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com


More information about the questions mailing list