summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-11-24 10:41:40 +0100
committerStefan Metzmacher <metze@samba.org>2009-11-24 11:49:01 +0100
commit0610f547aa5329b31f05408607d17dba68057b56 (patch)
treee1ec7a73bd7ecfb0d4b6df14a82f8b58b41fb067 /source3
parent14d2ca26b3abd0feb20f270c66847b7b2c17cb0a (diff)
downloadsamba-0610f547aa5329b31f05408607d17dba68057b56.tar.gz
samba-0610f547aa5329b31f05408607d17dba68057b56.tar.bz2
samba-0610f547aa5329b31f05408607d17dba68057b56.zip
s3:torture/nbio: use timeval_current/timeval_elapsed instead of start_timer/end_timer
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/torture/nbio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/torture/nbio.c b/source3/torture/nbio.c
index 063df1693f..054806811b 100644
--- a/source3/torture/nbio.c
+++ b/source3/torture/nbio.c
@@ -28,6 +28,7 @@ static char buf[70000];
extern int line_count;
extern int nbio_id;
static int nprocs;
+static struct timeval nb_start;
static struct {
int fd;
@@ -61,7 +62,9 @@ void nb_alarm(int ignore)
if (!children[i].done) num_clients++;
}
- printf("%4d %8d %.2f MB/sec\r", num_clients, lines/nprocs, 1.0e-6 * nbio_total() / end_timer());
+ printf("%4d %8d %.2f MB/sec\r",
+ num_clients, lines/nprocs,
+ 1.0e-6 * nbio_total() / timeval_elapsed(&nb_start));
signal(SIGALRM, nb_alarm);
alarm(1);
@@ -122,7 +125,7 @@ void nb_setup(struct cli_state *cli)
{
signal(SIGSEGV, sigsegv);
c = cli;
- start_timer();
+ nb_start = timeval_current();
children[nbio_id].done = 0;
}