From 65816fa1acd8abcb29e451ccc6158c0c3c00050c Mon Sep 17 00:00:00 2001 From: reyk <> Date: Tue, 10 Feb 2015 11:16:47 +0000 Subject: [PATCH] Don't show the subseconds when displaying the constraint offset. OK henning@ deraadt@ --- src/usr.sbin/ntpd/ntpd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/usr.sbin/ntpd/ntpd.c b/src/usr.sbin/ntpd/ntpd.c index 622fd223..ef35b719 100644 --- a/src/usr.sbin/ntpd/ntpd.c +++ b/src/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 @@ -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);