1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

in getrusage(), use RUSAGE_SELF for the current process rather than 0

ok millert@
This commit is contained in:
kevlo 2008-10-01 00:55:10 +00:00
parent 376cc467a3
commit 2fb4354e7d

View File

@ -1,5 +1,5 @@
/*
* $OpenBSD: locate.c,v 1.21 2008/07/26 10:57:09 jmc Exp $
* $OpenBSD: locate.c,v 1.22 2008/10/01 00:55:10 kevlo Exp $
*
* Copyright (c) 1995 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
* Copyright (c) 1989, 1993
@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: locate.c,v 1.21 2008/07/26 10:57:09 jmc Exp $
* $Id: locate.c,v 1.22 2008/10/01 00:55:10 kevlo Exp $
*/
#ifndef lint
@ -46,7 +46,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)locate.c 8.1 (Berkeley) 6/6/93";
#else
static char rcsid[] = "$OpenBSD: locate.c,v 1.21 2008/07/26 10:57:09 jmc Exp $";
static char rcsid[] = "$OpenBSD: locate.c,v 1.22 2008/10/01 00:55:10 kevlo Exp $";
#endif
#endif /* not lint */
@ -329,7 +329,7 @@ cputime(void)
{
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 */