- 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@.
diff --git a/progressmeter.c b/progressmeter.c
index 0f95222..0e570e4 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 @@
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 @@
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;