summaryrefslogtreecommitdiff
path: root/bin/dd/position.c
diff options
context:
space:
mode:
authorHugh Graham <hugh@cvs.openbsd.org>2001-08-07 14:39:28 +0000
committerHugh Graham <hugh@cvs.openbsd.org>2001-08-07 14:39:28 +0000
commit1123cf6f64f4be51a66dca47d05690ebf62b1be8 (patch)
tree8898b01cbc215f101f3a89a547d9d9302ae5b3b7 /bin/dd/position.c
parentcaf7ba66da583ab2f500dda722b13b550ed1b19e (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/position.c')
-rw-r--r--bin/dd/position.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/dd/position.c b/bin/dd/position.c
index a02a485bb55..0d02d2f7404 100644
--- a/bin/dd/position.c
+++ b/bin/dd/position.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: position.c,v 1.3 1997/02/14 07:05:22 millert Exp $ */
+/* $OpenBSD: position.c,v 1.4 2001/08/07 14:39:27 hugh Exp $ */
/* $NetBSD: position.c,v 1.4 1995/03/21 09:04:12 cgd Exp $ */
/*-
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)position.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: position.c,v 1.3 1997/02/14 07:05:22 millert Exp $";
+static char rcsid[] = "$OpenBSD: position.c,v 1.4 2001/08/07 14:39:27 hugh Exp $";
#endif
#endif /* not lint */
@@ -50,6 +50,7 @@ static char rcsid[] = "$OpenBSD: position.c,v 1.3 1997/02/14 07:05:22 millert Ex
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/mtio.h>
+#include <sys/time.h>
#include <err.h>
#include <errno.h>