summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/ntpd/refclock_fg.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/ntpd/refclock_fg.c')
-rw-r--r--contrib/ntp/ntpd/refclock_fg.c12
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;
}
OpenPOWER on IntegriCloud