>>-times--stem-------------------------------------------------><
Function
times invokes the times callable service to collect information
about processor time used by the current process or related processes. The elapsed time since
the process was dubbed is returned in RETVAL. This value is of the
type clock_t, which needs to be divided by sysconf(_SC_CLK_TK) to
convert it to seconds. For z/OS UNIX, this value is expressed in hundredths
of a second.
Parameters
- stem
- The name of a stem variable used to return the information.
Upon return, stem.0 contains the number of variables returned.
Four variables are returned in the stem. To access the stem variables,
use a numeric value or the predefined variables beginning with TMS_
used to derive that numeric value. (For the numeric values, see REXX predefined variables.) For example, you could specify stem.4 or stem.tms_cstime to obtain system CPU values:
Variable |
Description |
---|
TMS_CSTIME |
The sum of system CPU time values and child system
CPU time values for all waited-for child processes that have terminated.
Zero if the current process has no waited-for children. |
TMS_CUTIME |
The sum of user CPU time values and child user
CPU time values for all waited-for child processes that have terminated.
Zero if the current process has no waited-for children. |
TMS_STIME |
The system CPU time of current process in hundredths
of a second. This is the task control block (TCB) time accumulated
while running in the kernel address space. |
TMS_UTIME |
The user CPU time of current process in hundredths
of a second. This includes the TCB and service request block (SRB)
time of the calling process minus the TCB time accumulated while running
in the kernel address space. |
Usage notes
Processor times for a child process that has ended are not added
to the TMS_CUTIME and TMS_CSTIME of the parent process until the parent
issues a wait or waitpid for that child process.