.\"reports information gathered by the getrusage() system call.
.DT
rusage
$MUDNAME$ driver help
rusage
.SH Name
.SI 5
rusage() - reports information gathered by the getrusage() system call
.EI
.SH Synopsis
.SI 5
mapping rusage( void );
.EI
.SH Description
.SP 5 5
This efun collects information gathered via the getrusage() system
call. Read the getrusage() man page for more information on what information
will be collected. Some systems do not have the getrusage() system call
but do have the times() system call. On those systems, only "utime"
and "stime" will be available. Times are reported in milliseconds.
Here is an example usage of rusage():
.EP
.SI 5
void create()
{
mapping info;
info = rusage();
write("user time = " + info["utime"] + "ms\n");
write("system time = " + info["stime"] + "ms\n");
}
.EI
.SP 5 5
The available fields are:
utime, stime, maxrss, ixrss, idrss, isrss, minflt, majflt, nswap, inblock,
oublock, msgsnd, msgrcv, nsignals, nvcsw and nivcsw. Not all fields may
be available.
.EP
.SH See also
.SI 5
time_expression(), time(), uptime()
.EI