times(2) SDK R4.11 times(2)
NAME
times - get process and child process times
SYNOPSIS
#include <sys/types.h>
#include <sys/times.h>
clock_t times (buffer)
struct tms * buffer;
where:
buffer The address of a structure into which the times are to be
put
DESCRIPTION
The times system call fills in the structure pointed to by buffer
with time accounting information for the calling process and each of
its terminated child processes for which it has executed a wait.
All times are defined in units of 1/{CLK_TCK} of a second. See
sysconf(2).
The value of tms_utime is the CPU time used while executing
instructions in the user space of the calling process.
The value of tms_stime is the CPU time used by the system on behalf
of the calling process.
The value of tms_cutime is the sum of the tms_utime and tms_cutime of
the child processes.
The value of tms_sutime is the sum of the tms_stime and tms_cstime of
the child processes.
ACCESS CONTROL
The argument buffer must point to an area of the calling process's
address space that is valid and has write access.
RETURN VALUE
Upon successful completion, times returns the elapsed real-time, in
[CLK_TCK]ths 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. Hence, a single value returned from
this call is not meaningful; only the difference between values
returned at different times is meaningful.
If an error occurs, -1 is returned and errno is set to indicate the
error.
DIAGNOSTICS
Errno may be set to one of the following error codes:
EFAULT Buffer points to an illegal address.
SEE ALSO
time(1), exec(2), fork(2), time(2), wait(2).
Licensed material--property of copyright holder(s)