[LinuxPPS] How to use PPS to adjust system clock time ?

Ran Shalit Ran.Shalit at comm-it.com
Sat Feb 16 08:53:11 CET 2019


> 2. Is it that the time_pps_kcbind API is responsible to adjust system clock
> with PPS ? Is there an example showing how to do it ?
>
> I also don't fully understand the pps time interface,as can be read from
> userspace using time_pps_fetch command (see ppstest.c example)
>
> 3. How is it that pps already have nsec resolution if it is a clock
> which is only "pulse per second" ? Does it mean that the
> time_pps_fetch already gives time which is synchronized with system
> timer ?

>You know that pulses arrive every 1 second precisely so if you attach to these
>pulses a timestamp with nsec resolution you can compute how much your system
>clock runs wrong.


Thank you very much Rodolfo for the reply.
I had assumed that linuxPPS interface should only use seconds (2,3,...) but I still don't understand where the nanosecond resolution in linuxpps interface arrives from.
Is it that the linuxpps interface already attached the pps to the system clock ? 

Thanks,


--
GNU/Linux Solutions                  e-mail: giometti at enneenne.com
Linux Device Driver                          giometti at linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti

----------

This email has been scanned for spam and viruses by Proofpoint Essentials. Visit the following link to report this email as spam:
https://eu1.proofpointessentials.com/index01.php?mod_id=11&mod_option=logitem&mail_id=1550303255-zmMYQzG4e8Zv&r_address=ran.shalit%40comm-it.com&report=1




More information about the discussions mailing list