diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2009-01-26 11:51:51 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2009-01-26 11:51:51 +0000 |
commit | 4aec45356703e9fbf73bbf09fbb17abb83475bdb (patch) | |
tree | bfed85beca4266d74ec03b14c6810ee938bb8a49 /usr.sbin/ntpd | |
parent | ce3f2c178cd72efff098117e61a51f13b2cb28eb (diff) |
use monotime instead of wallclock for the report thing as well
found on this laptops harddisk, probably from stockholm
Diffstat (limited to 'usr.sbin/ntpd')
-rw-r--r-- | usr.sbin/ntpd/ntp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ntpd/ntp.c b/usr.sbin/ntpd/ntp.c index 04bd4a21c1b..7e9eff3b92c 100644 --- a/usr.sbin/ntpd/ntp.c +++ b/usr.sbin/ntpd/ntp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntp.c,v 1.109 2008/12/10 09:03:30 claudio Exp $ */ +/* $OpenBSD: ntp.c,v 1.110 2009/01/26 11:51:50 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -188,7 +188,7 @@ ntp_main(int pipe_prnt[2], struct ntpd_conf *nconf, struct passwd *pw) peer_cnt++; /* wait 5 min before reporting first status to let things settle down */ - lastreport = time(NULL) + (5 * 60) - REPORT_INTERVAL; + lastreport = getmonotime() + (5 * 60) - REPORT_INTERVAL; while (ntp_quit == 0) { if (peer_cnt > idx2peer_elms) { @@ -741,7 +741,7 @@ report_peers(int always) badsensors++; } - now = time(NULL); + now = getmonotime(); if (!always) { if ((peer_cnt == 0 || badpeers == 0 || badpeers < peer_cnt / 2) && (sensors_cnt == 0 || badsensors == 0 || |