diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-05 07:46:17 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-05 07:46:17 +0000 |
commit | 1e7f981d00467d42a37fabc57f408996a19611bb (patch) | |
tree | 78f2567686288d02c7345abbad652abec86ec6e5 /usr.sbin/ntpd/ntpd.h | |
parent | 12ced0bd9ce029f4677492b1801929b8233c7210 (diff) |
calculate the median offset from all servers we sync to and call
adjtime() when necessary to keep the local clock in sync
yes, that means ntpd syncs the local clock now.
Diffstat (limited to 'usr.sbin/ntpd/ntpd.h')
-rw-r--r-- | usr.sbin/ntpd/ntpd.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/ntpd.h b/usr.sbin/ntpd/ntpd.h index 77316d5a6c4..a89e7c6b99f 100644 --- a/usr.sbin/ntpd/ntpd.h +++ b/usr.sbin/ntpd/ntpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.h,v 1.9 2004/07/04 22:24:20 henning Exp $ */ +/* $OpenBSD: ntpd.h,v 1.10 2004/07/05 07:46:16 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -36,6 +36,7 @@ #define NTPD_OPT_VERBOSE 0x0001 #define NTPD_OPT_VERBOSE2 0x0002 +#define INTERVAL_ADJTIME 120 /* call adjtime every n seconds */ #define INTERVAL_QUERY 60 /* sync with peers every n seconds */ #define QUERYTIME_MAX 30 /* single query might take n secs max */ @@ -101,7 +102,8 @@ struct imsgbuf { }; enum imsg_type { - IMSG_NONE + IMSG_NONE, + IMSG_ADJTIME }; struct imsg_hdr { @@ -176,5 +178,6 @@ int client_dispatch(struct ntp_peer *); /* util.c */ double gettime(void); +void d_to_tv(double, struct timeval *); double lfp_to_d(struct l_fixedpt); struct l_fixedpt d_to_lfp(double); |