times(3)times(3)Nametimes - get process timesSyntax
#include <sys/times.h>
clock_t
times(buffer)
struct tms *buffer;
Description
The subroutine returns time-accounting information for the current
process and for the terminated child processes of the current process.
All times are in 1/HZ seconds, where HZ is equivalent to 60.
The following structure is returned by
struct tms {
clock_t tms_utime; /* user time */
clock_t tms_stime; /* system time */
clock_t tms_cutime; /* user time, children */
clock_t tms_cstime; /* system time, children */
};
The children times are the sum of the children's process times and
their children's times.
Return Values
If successful, the function returns the elapsed time since 00:00:00
GMT, January 1, 1970 in units of 1/60's of a second. When the function
fails, it returns -1
See Alsotime(1), getrusage(2), wait3(2), time(3)times(3)