[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    times(3B) manual page Table of Contents

Name

times - get process times

Synopsis

/usr/ucb/cc [ flag ... ] file ...


#include <sys/param.h>
#include <sys/types.h>
#include <sys/times.h>

int times(tmsp)
register struct tms *tmsp;

Description

times() returns time-accounting information for the current process and for the terminated child processes of the current process. All times are reported in clock ticks. The number of clock ticks per second is defined by the variable CLK_TCK, found in the header <limits.h>.

A structure with the following members is returned by times():


    time_t    tms_utime;    /* user time */
    time_t    tms_stime;    /* system time */
    time_t    tms_cutime;    /* user time, children */
    time_t    tms_cstime;    /* system time, children */

The children’s times are the sum of the children’s process times and their children’s times.

Return Values

times() returns
  1. on success.
    -1
    on failure.

    See Also

    time(1) , time(2) , wait(2) , getrusage(3C)

    Notes

    Use of these interfaces should be restricted to only applications written on BSD platforms. Use of these interfaces with any of the system libraries or in multi-thread applications is unsupported.

    times() has been superseded by getrusage(3C) .


    Table of Contents