NAME | SYNOPSIS | API RESTRICTIONS | DESCRIPTION | ERRORS | ATTRIBUTES | SEE ALSO
#include <sys/times.h>clock_t times(struct tms *tp);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
This function is made obsolete by gettimeofday(2POSIX).
The times() function returns the value of time in CLK_TCK's of a second since 0 hours, 0 minutes, 0 seconds, January 1, 1970, Coordinated Universal Time.
It also fills in the structure pointed to by tp with time-accounting information.
The fields of the tms
structure are defined as follows:
The CPU time charged for the execution of user instructions.
The CPU time charged for execution by the system on behalf of the process.
The sum of the tms_utimes and tms_cutimes of the child processes.
The sum of the tms_utimes and tms_cutimes of the child processes.
All times are in CLK_TCK's of a second.
The times of a terminated child process are included in the tms_cutime and tms_cstime fields of the parent when one of the wait(2POSIX) functions returns the process ID of the terminated child to the parent. If an error occurs, times() returns the value ((clock_t)-1), and sets errno to indicate the error.
times() may fail and set errno for any of the errors specified for gettimeofday(2POSIX).
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
MT-Level | Async-Signal-Safe |
NAME | SYNOPSIS | API RESTRICTIONS | DESCRIPTION | ERRORS | ATTRIBUTES | SEE ALSO