summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2015-02-10 11:16:48 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2015-02-10 11:16:48 +0000
commitc7de06f60fd9900d96e301a6ec02436d5ef084e6 (patch)
tree27f570278eae2063daf7ae84cab2ba959bd739f4 /usr.sbin/ntpd
parentcf3b4eb0466bc38b73eb85ca36cd9992134ce5b2 (diff)
Don't show the subseconds when displaying the constraint offset.
OK henning@ deraadt@
Diffstat (limited to 'usr.sbin/ntpd')
-rw-r--r--usr.sbin/ntpd/ntpd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c
index 622fd223dbc..ef35b71936b 100644
--- a/usr.sbin/ntpd/ntpd.c
+++ b/usr.sbin/ntpd/ntpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntpd.c,v 1.89 2015/02/10 06:40:08 reyk Exp $ */
+/* $OpenBSD: ntpd.c,v 1.90 2015/02/10 11:16:47 reyk Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -728,8 +728,8 @@ show_status_msg(struct imsg *imsg)
tv.tv_sec = cstatus->constraint_median +
(getmonotime() - cstatus->constraint_last);
tv.tv_usec = 0;
- printf("constraint offset %f",
- gettime_from_timeval(&tv) - gettime());
+ d_to_tv(gettime_from_timeval(&tv) - gettime(), &tv);
+ printf("constraint offset %llds", (long long)tv.tv_sec);
if (cstatus->constraint_errors)
printf(" (%d errors)",
cstatus->constraint_errors);