TIMES(2-POSIX) RISC/os Reference Manual TIMES(2-POSIX)
NAME
times - get process and child process times
SYNOPSIS
#include <sys/times.h>
clockt times (buffer)
struct tms *buffer;
DESCRIPTION
times fills the structure pointed to by buffer with time-
accounting information. The tms structure is defined in
<sys/times.h> and includes the following members:
clock_t tms_utime; /* user CPU time */
clock_t tms_stime; /* system CPU time */
clock_t tms_cutime; /* user CPU time of */
/* terminated child processes */
clock_t tms_cstime; /* system CPU time of */
/* terminated child processes */
This information comes from the calling process and each of
its terminated child processes for which it has executed a
wait or waitpid. All times are reported in clock ticks.
tms_utime is the CPU time used while executing instructions
in the user space of the calling process.
tms_stime is the CPU time used by the system on behalf of
the calling process.
tms_cutime is the sum of the tms_utimes and tms_cutimes of
the child processes.
tms_cstime is the sum of the tms_stimes and tms_cstimes of
the child processes.
RETURN VALUES
Upon successful completion, times returns the elapsed real
time, in clock ticks, 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
value of ((clock_t) -1) is returned and errno is set to
indicate the error.
ERRORS
[EFAULT] buffer points to an illegal address.
SEE ALSO
exec(2), fork(2), time(2), wait(2).
Printed 1/15/91 Page 1