From 50b997c3ef37a1ddf001ca0d904e14d196e8ed03 Mon Sep 17 00:00:00 2001 From: kevlo Date: Tue, 2 Sep 2008 02:59:13 +0000 Subject: Use RUSAGE_SELF for the current process instead of hardcoded value --- sbin/md5/md5.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sbin') diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index 7f837a3..9436aa2 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -228,7 +228,7 @@ MDTimeTrial(Algorithm_t *alg) block[i] = (unsigned char) (i & 0xff); /* Start timer */ - getrusage(0, &before); + getrusage(RUSAGE_SELF, &before); /* Digest blocks */ alg->Init(&context); @@ -237,7 +237,7 @@ MDTimeTrial(Algorithm_t *alg) p = alg->End(&context, buf); /* Stop timer */ - getrusage(0, &after); + getrusage(RUSAGE_SELF, &after); timersub(&after.ru_utime, &before.ru_utime, &total); seconds = total.tv_sec + (float) total.tv_usec / 1000000; -- cgit v1.1