diff options
author | kevlo <kevlo@FreeBSD.org> | 2008-09-02 02:59:13 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2008-09-02 02:59:13 +0000 |
commit | 50b997c3ef37a1ddf001ca0d904e14d196e8ed03 (patch) | |
tree | 9b4b0f09ea79a892964a427f42f64a21f6eef1e1 /sbin/md5 | |
parent | 5b1439fb4876c015207f761e57de477662d4ddd6 (diff) | |
download | FreeBSD-src-50b997c3ef37a1ddf001ca0d904e14d196e8ed03.zip FreeBSD-src-50b997c3ef37a1ddf001ca0d904e14d196e8ed03.tar.gz |
Use RUSAGE_SELF for the current process instead of hardcoded value
Diffstat (limited to 'sbin/md5')
-rw-r--r-- | sbin/md5/md5.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |