summaryrefslogtreecommitdiffstats
path: root/progressmeter.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-06-01 23:46:16 +0200
committerDarren Tucker <dtucker@zip.com.au>2013-06-01 23:46:16 +0200
commitb759c9c2efebe7b416ab81093ca8eb17836b6933 (patch)
tree41ad0279844ea8f149ab2c1015fa140061b390ac /progressmeter.c
parent - dtucker@cvs.openbsd.org 2013/05/31 12:28:10 (diff)
downloadopenssh-b759c9c2efebe7b416ab81093ca8eb17836b6933.tar.xz
openssh-b759c9c2efebe7b416ab81093ca8eb17836b6933.zip
- 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@.
Diffstat (limited to 'progressmeter.c')
-rw-r--r--progressmeter.c6
1 files changed, 3 insertions, 3 deletions
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;