PXFTIMES(3F) Last changed: 1-6-98
PXFTIMES - Gets process times
SUBROUTINE PXFTIMES (jtms, itime, ierror)
INTEGER jtms, itime, ierror
UNICOS, UNICOS/mk, and IRIX systems
IEEE standard interface for FORTRAN 77
On IRIX systems, this routine is in libfortran.so which is linked by
default when compiling programs with the MIPSpro 7 Fortran 90 compiler
or when compiling programs with the -craylibs option to the MIPSpro
7.2 F77 compiler.
The PXFTIMES subroutine uses the times(2) system call to access system
and user CPU time and wall-clock time for the current process and any
child processes.
Components of the tms structure are:
* tms_utime: User CPU time
* tms_stime: System CPU time
* tms_cutime: User CPU time of terminated child processes
* tms_cstime: System CPU time of terminated child processes
The processing time for a child process is included in the tms_cutime
and tms_cstime elements of the tms structure when the parent process
waits for child process termination.
When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
kind unless documented otherwise. On UNICOS and UNICOS/mk, default
kind is KIND=8 for integer, real, complex, and logical arguments; on
IRIX, the default kind is KIND=4.
The following is a list of valid arguments for this routine:
jtms A handle of type tms created with PXFSTRUCTCREATE(3F).
itime An output integer variable for the number of system hardware
clock ticks since some arbitrary point in the past (for
example, system startup time). This point does not change
from one invocation to another during the execution of the
process.
ierror An output integer variable that contains zero if PXFTIMES
was successful or nonzero if PXFTIMES was not successful.
PXFTIMES may return the EBADHANDLE error value if jtms is an invalid
handle or has an incorrect handle type.
This example shows how to use the PXFTIMES routine to retrieve system
and user CPU time information since the beginning of process
execution.
program testpxf
integer itime, jtms, ierr, itmp
c create the tms struct
call PXFSTRUCTCREATE('tms',jtms,ierr)
print *,'structcreate error = ',ierr
c call PXFTIMES and print out returned information
call PXFTIMES(jtms,itime,ierr)
print *,'time = ',itime
call PXFINTGET(jtms,'tms_utime',itmp,ierr)
print *,'tms_utime = ',itmp,' ',ierr
call PXFINTGET(jtms,'tms_stime',itmp,ierr)
print *,'tms_stime = ',itmp,' ',ierr
call PXFINTGET(jtms,'tms_cutime',itmp,ierr)
print *,'tms_cutime = ',itmp,' ',ierr
call PXFINTGET(jtms,'tms_cstime',itmp,ierr)
print *,'tms_cstime = ',itmp,' ',ierr
c free the tms struct
call PXFSTRUCTFREE(jtms,ierr)
end
times(2)
PXFSTRUCTCREATE(3F)
Application Programmer's Library Reference Manual, publication SR2165,
for the printed version of this man page.
PXFTIMES(3F) Last changed: 1-6-98
PXFTIMES - Gets process times
SUBROUTINE PXFTIMES (jtms, itime, ierror)
INTEGER jtms, itime, ierror
UNICOS, UNICOS/mk, and IRIX systems
IEEE standard interface for FORTRAN 77
On IRIX systems, this routine is in libfortran.so which is linked by
default when compiling programs with the MIPSpro 7 Fortran 90 compiler
or when compiling programs with the -craylibs option to the MIPSpro
7.2 F77 compiler.
The PXFTIMES subroutine uses the times(2) system call to access system
and user CPU time and wall-clock time for the current process and any
child processes.
Components of the tms structure are:
* tms_utime: User CPU time
* tms_stime: System CPU time
* tms_cutime: User CPU time of terminated child processes
* tms_cstime: System CPU time of terminated child processes
The processing time for a child process is included in the tms_cutime
and tms_cstime elements of the tms structure when the parent process
waits for child process termination.
When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
kind unless documented otherwise. On UNICOS and UNICOS/mk, default
kind is KIND=8 for integer, real, complex, and logical arguments; on
IRIX, the default kind is KIND=4.
The following is a list of valid arguments for this routine:
jtms A handle of type tms created with PXFSTRUCTCREATE(3F).
itime An output integer variable for the number of system hardware
clock ticks since some arbitrary point in the past (for
example, system startup time). This point does not change
from one invocation to another during the execution of the
process.
ierror An output integer variable that contains zero if PXFTIMES
was successful or nonzero if PXFTIMES was not successful.
PXFTIMES may return the EBADHANDLE error value if jtms is an invalid
handle or has an incorrect handle type.
This example shows how to use the PXFTIMES routine to retrieve system
and user CPU time information since the beginning of process
execution.
program testpxf
integer itime, jtms, ierr, itmp
c create the tms struct
call PXFSTRUCTCREATE('tms',jtms,ierr)
print *,'structcreate error = ',ierr
c call PXFTIMES and print out returned information
call PXFTIMES(jtms,itime,ierr)
print *,'time = ',itime
call PXFINTGET(jtms,'tms_utime',itmp,ierr)
print *,'tms_utime = ',itmp,' ',ierr
call PXFINTGET(jtms,'tms_stime',itmp,ierr)
print *,'tms_stime = ',itmp,' ',ierr
call PXFINTGET(jtms,'tms_cutime',itmp,ierr)
print *,'tms_cutime = ',itmp,' ',ierr
call PXFINTGET(jtms,'tms_cstime',itmp,ierr)
print *,'tms_cstime = ',itmp,' ',ierr
c free the tms struct
call PXFSTRUCTFREE(jtms,ierr)
end
times(2)
PXFSTRUCTCREATE(3F)
Application Programmer's Library Reference Manual, publication SR2165,
for the printed version of this man page.
[ Back ]
|