diff options
author | Hugh Graham <hugh@cvs.openbsd.org> | 2001-08-07 14:39:28 +0000 |
---|---|---|
committer | Hugh Graham <hugh@cvs.openbsd.org> | 2001-08-07 14:39:28 +0000 |
commit | 1123cf6f64f4be51a66dca47d05690ebf62b1be8 (patch) | |
tree | 8898b01cbc215f101f3a89a547d9d9302ae5b3b7 /bin/dd/dd.c | |
parent | caf7ba66da583ab2f500dda722b13b550ed1b19e (diff) |
Modify timekeeping in an effort to produce a sane bandwidth measure
for a short running dd process. Some floating point is used so that
microsecond precision can be kept without shortening the off_t
excessively. millert says ok.
Diffstat (limited to 'bin/dd/dd.c')
-rw-r--r-- | bin/dd/dd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/dd/dd.c b/bin/dd/dd.c index 601da2b113c..b9daa89f8bf 100644 --- a/bin/dd/dd.c +++ b/bin/dd/dd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dd.c,v 1.8 1998/04/30 05:55:02 deraadt Exp $ */ +/* $OpenBSD: dd.c,v 1.9 2001/08/07 14:39:27 hugh Exp $ */ /* $NetBSD: dd.c,v 1.6 1996/02/20 19:29:06 jtc Exp $ */ /*- @@ -48,7 +48,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)dd.c 8.5 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: dd.c,v 1.8 1998/04/30 05:55:02 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: dd.c,v 1.9 2001/08/07 14:39:27 hugh Exp $"; #endif #endif /* not lint */ @@ -206,7 +206,8 @@ setup() #endif /* NO_CONV */ } - (void)time(&st.start); /* Statistics timestamp. */ + /* Statistics timestamp. */ + (void)gettimeofday(&st.startv, (struct timezone *)NULL); } static void |