summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd/ntp.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2006-05-31 01:27:22 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2006-05-31 01:27:22 +0000
commitc6e71633f41158e32b4d1e9980d6ae22e4326b4a (patch)
treeabd84670272dec5d19f646796941431a4749913d /usr.sbin/ntpd/ntp.c
parenta17d9ae674be35096bc95ea0be4d7699cffeef27 (diff)
only actually run sensor_query when it is due, not every time poll returns
Diffstat (limited to 'usr.sbin/ntpd/ntp.c')
-rw-r--r--usr.sbin/ntpd/ntp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/ntp.c b/usr.sbin/ntpd/ntp.c
index 0bf8bc279ac..3d39563770b 100644
--- a/usr.sbin/ntpd/ntp.c
+++ b/usr.sbin/ntpd/ntp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntp.c,v 1.77 2006/05/28 20:39:16 henning Exp $ */
+/* $OpenBSD: ntp.c,v 1.78 2006/05/31 01:27:21 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -297,7 +297,8 @@ ntp_main(int pipe_prnt[2], struct ntpd_conf *nconf)
for (s = TAILQ_FIRST(&conf->ntp_sensors); s != NULL;
s = next_s) {
next_s = TAILQ_NEXT(s, entry);
- sensor_query(s);
+ if (s->next <= time(NULL))
+ sensor_query(s);
}
}