[Git][NTPsec/ntpsec][master] ntpd: remove two more places where good data thrown away.

Gary E. Miller gitlab at mg.gitlab.com
Mon Nov 7 23:46:16 UTC 2016


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
783eb388 by Gary E. Miller at 2016-11-07T15:44:46-08:00
ntpd: remove two more places where good data thrown away.

On the RasPi the PPS time stamps are way more accurate than
sys_precision.  sys_precision is merely the rate at which the system
clock can be queried, which is mainly dependent on the kernel scheduler.

- - - - -


1 changed file:

- ntpd/ntp_proto.c


Changes:

=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -597,7 +597,7 @@ handle_procpkt(
 	    scalbn((double)(pkt->rec - lfp_to_uint64(&peer->org)), -32) :
 	    -scalbn((double)(lfp_to_uint64(&peer->org) - pkt->rec), -32);
 	const double theta = (t21 + t34) / 2.;
-	const double delta = max(fabs(t21 - t34), LOGTOD(sys_precision));
+	const double delta = fabs(t21 - t34);
 	const double epsilon = LOGTOD(sys_precision) +
 	    LOGTOD(peer->precision) +
 	    clock_phi * delta;
@@ -1894,7 +1894,6 @@ clock_select(void)
 				k = i;
 			}
 		}
-		g = max(g, LOGTOD(sys_precision));
 		if (nlist <= max(1, sys_minclock) || g <= d ||
 		    ((FLAG_TRUE | FLAG_PREFER) & peers[k].peer->flags))
 			break;



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/783eb388348d2944f9d8e10bc28f6eece6c0e12c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161107/ac1cd887/attachment.html>


More information about the vc mailing list