www.delorie.com/djgpp/doc/libc-2.01/libc_347.html   search  
Go to the first, previous, next, last section, table of contents.


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);


Go to the first, previous, next, last section, table of contents.

  prev next   webmaster     delorie software   privacy  
  Copyright © 1997     Updated Apr 1997