|
|
HP-UX Reference Volume 3 of 5 > ttimes(2) |
|
NAMEtimes — get process and child process times DESCRIPTIONtimes() fills the structure pointed to by buffer with time-accounting information. The structure defined in <sys/times.h> is as follows: 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 */ }; This information comes from the calling process and each of its terminated child processes for which it has executed a wait(), wait3(), or waitpid(). The times are in units of 1/CLK_TCK seconds, where CLK_TCK is processor dependent The value of CLK_TCK can be queried using the sysconf() function (see sysconf(2)). 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 VALUEUpon successful completion, times() returns the elapsed real time, in units of 1/CLK_TCK of a second, since an arbitrary point in the past (such as system start-up time). This point does not change from one invocation of times() to another. If times() fails, -1 is returned and errno is set to indicate the error. ERRORS
|
|