Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>getrusage</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
getrusage
=========

Syntax
------

     #include <sys/time.h>
     #include <sys/resource.h
     
     int getrusage(int who, struct rusage *rusage);

Description
-----------

This function returns information about the running process.  Currently,
the only field that is computed is this:

     struct rusage {
       struct timeval ru_utime;  /* total time used by process */
     };

The remainder of the fields are set to zero.

The WHO parameter must be `RUSAGE_SELF' or `RUSAGE_CHILDREN'.

Return Value
------------

Zero on success, nonzero on failure.

Example
-------

     struct rusage r;
     getrusage(RUSAGE_SELF, &r);


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson