times(2) times(2)
NAME
times - get process and child process times
SYNOPSIS
#include <sys/types.h>
#include <sys/times.h>
long times (buffer)
struct tms *buffer;
DESCRIPTION
times fills the structure pointed to by buffer with time-
accounting information. The following are the contents of
this structure:
struct tms {
time_t tms_utime;
time_t tms_stime;
time_t tms_cutime;
time_t tms_cstime;
};
This information comes from the calling process and each of
its terminated child processes for which it has executed a
wait. All times are in 60ths of a second.
tmsutime is the CPU time used while executing instructions
in the user space of the calling process.
tmsstime is the CPU time used by the system on behalf of
the calling process.
tmscutime is the sum of the and tmscutimes of the child
processes.
tmscstime is the sum of the tmsstimes and tmscstimes of
the child processes.
[EFAULT] times will fail if buffer points to an illegal
address.
RETURN VALUE
Upon successful completion, times returns the elapsed real
time, in 60ths of a second, since an arbitrary point in the
past (e.g., system start-up time). This point does not
change from one invocation of times to another. If times
fails, a -1 is returned and errno is set to indicate the
error.
SEE ALSO
exec(2), fork(2), time(2), wait(2).
Page 1 (last mod. 1/14/87)