From 3fe0cc5a82e4ca92f9ccaa2978f1b9cc6efc5351 Mon Sep 17 00:00:00 2001 From: kevlo Date: Tue, 2 Sep 2008 02:59:38 +0000 Subject: Use RUSAGE_SELF for the current process instead of hardcoded value --- usr.bin/locate/locate/locate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin/locate') diff --git a/usr.bin/locate/locate/locate.c b/usr.bin/locate/locate/locate.c index 64ce7f9..d7529fb 100644 --- a/usr.bin/locate/locate/locate.c +++ b/usr.bin/locate/locate/locate.c @@ -325,7 +325,7 @@ cputime () { struct rusage rus; - getrusage(0, &rus); + getrusage(RUSAGE_SELF, &rus); return(rus.ru_utime.tv_sec * 1000 + rus.ru_utime.tv_usec / 1000); } #endif /* DEBUG */ -- cgit v1.1