Use RUSAGE_SELF for the current process instead of hardcoded value
This commit is contained in:
parent
1f0e597d5a
commit
4c6ea66f44
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user