[ntp:questions] Re: Please demistify the SHM driver

Piotr Trojanek ptrojane at mion.elka.pw.edu.pl
Tue Sep 16 06:37:23 UTC 2003

In article <bk5cj3$1h5$1 at news.univ-mrs.fr>, Jerome Oufella wrote:
>What value(s) should I set, while my GPS clock only sends me the 
>following values :
>  - Day
>  - Month
>  - Year
>  - Hour (local time)
>  - Minutes
>  - Seconds
>Once every minute. I use them to build a UNIX time_t. Should it be 
>stored in clockTimeStampSec or receiveTimeStampSec ?

you can set VMIN and VTIME fields of `struct termios` to
do blocking read(). When it returns, you catch gettimeofday()
'as soon as possible', then finishes decoding serial data.

receiveTimeStamp is that from gettimeofday(), and clockTimeStamp
is that from serial data.

>What about leap & precision ?

if you can't guess them from serial data, use values on which NTP
will not complain:)

Piotr Trojanek

More information about the questions mailing list