From b759c9c2efebe7b416ab81093ca8eb17836b6933 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 2 Jun 2013 07:46:16 +1000 Subject: - dtucker@cvs.openbsd.org 2013/06/01 13:15:52 [ssh-agent.c clientloop.c misc.h packet.c progressmeter.c misc.c channels.c sandbox-systrace.c] Use clock_gettime(CLOCK_MONOTONIC ...) for ssh timers so that things like keepalives and rekeying will work properly over clock steps. Suggested by markus@, "looks good" djm@. --- progressmeter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'progressmeter.c') diff --git a/progressmeter.c b/progressmeter.c index 0f95222d2..0e570e41a 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: progressmeter.c,v 1.37 2006/08/03 03:34:42 deraadt Exp $ */ +/* $OpenBSD: progressmeter.c,v 1.38 2013/06/01 13:15:52 dtucker Exp $ */ /* * Copyright (c) 2003 Nils Nordman. All rights reserved. * @@ -131,7 +131,7 @@ refresh_progress_meter(void) transferred = *counter - cur_pos; cur_pos = *counter; - now = time(NULL); + now = monotime(); bytes_left = end_pos - cur_pos; if (bytes_left > 0) @@ -249,7 +249,7 @@ update_progress_meter(int ignore) void start_progress_meter(char *f, off_t filesize, off_t *ctr) { - start = last_update = time(NULL); + start = last_update = monotime(); file = f; end_pos = filesize; cur_pos = 0; -- cgit v1.2.3 From 00e1abb1ebe13ab24e812f68715f46e65e7c5271 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 2 Jun 2013 23:46:24 +1000 Subject: - dtucker@cvs.openbsd.org 2013/06/02 13:33:05 [progressmeter.c] Add misc.h for monotime prototype. (id sync only) --- ChangeLog | 4 ++++ progressmeter.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'progressmeter.c') diff --git a/ChangeLog b/ChangeLog index 058579f54..0a66555b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ 20130602 - (tim) [Makefile.in] Make Solaris, UnixWare, & OpenServer linkers happy linking regress/modpipe. + - (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/06/02 13:33:05 + [progressmeter.c] + Add misc.h for monotime prototype. (ID sync only). 20130601 - (dtucker) [configure.ac openbsd-compat/xcrypt.c] bz#2112: fall back to diff --git a/progressmeter.c b/progressmeter.c index 0e570e41a..332bd3c99 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: progressmeter.c,v 1.38 2013/06/01 13:15:52 dtucker Exp $ */ +/* $OpenBSD: progressmeter.c,v 1.39 2013/06/02 13:33:05 dtucker Exp $ */ /* * Copyright (c) 2003 Nils Nordman. All rights reserved. * -- cgit v1.2.3