diff options
author | roberto <roberto@FreeBSD.org> | 2004-07-20 15:01:56 +0000 |
---|---|---|
committer | roberto <roberto@FreeBSD.org> | 2004-07-20 15:01:56 +0000 |
commit | 118e757284cbb8fc4f43a713e892b41504b50a5f (patch) | |
tree | 528d12dda44ebdc3ffcc38050f159ac553a69c17 /contrib/ntp/ntpd/refclock_fg.c | |
parent | a85d9ae25e8e8696677bc30feb6eaf7fc150e529 (diff) | |
download | FreeBSD-src-118e757284cbb8fc4f43a713e892b41504b50a5f.zip FreeBSD-src-118e757284cbb8fc4f43a713e892b41504b50a5f.tar.gz |
Virgin import of ntpd 4.2.0
Diffstat (limited to 'contrib/ntp/ntpd/refclock_fg.c')
-rw-r--r-- | contrib/ntp/ntpd/refclock_fg.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/ntp/ntpd/refclock_fg.c b/contrib/ntp/ntpd/refclock_fg.c index 655b6bc..ebcf1b5 100644 --- a/contrib/ntp/ntpd/refclock_fg.c +++ b/contrib/ntp/ntpd/refclock_fg.c @@ -299,14 +299,14 @@ fg_receive( { pp->minute = BP1(7)*10 + BP2(7); pp->second = BP1(8)*10 + BP2(8); - pp->msec = BP1(9)*10 + BP2(9); - pp->usec = BP1(10); + pp->nsec = (BP1(9)*10 + BP2(9)) * 1000000; + pp->nsec += BP1(10) * 1000; } else { pp->hour = BP1(5)*10 + BP2(5); pp->minute = BP1(6)*10 + BP2(6); pp->second = BP1(7)*10 + BP2(7); - pp->msec = BP1(8)*10 + BP2(8); - pp->usec = BP1(9); + pp->nsec = (BP1(8)*10 + BP2(8)) * 1000000; + pp->nsec += BP1(9) * 1000; } if((pp->hour == 10) && (pp->minute == 10)) @@ -327,7 +327,7 @@ fg_receive( if (peer->stratum <= 1) peer->refid = pp->refid; pp->disp = (10e-6); - pp->lastrec = rbufp->recv_time; /* Is it better then get_systime()? */ + pp->lastrec = rbufp->recv_time; /* Is it better than get_systime()? */ /* pp->leap = LEAP_NOWARNING; */ /* @@ -337,7 +337,7 @@ fg_receive( if (!refclock_process(pp)) refclock_report(peer, CEVNT_BADTIME); - + pp->lastref = pp->lastrec; refclock_receive(peer); return; } |