1times(3UCB)        SunOS/BSD Compatibility Library Functions       times(3UCB)
2
3
4

NAME

6       times - get process times
7

SYNOPSIS

9       /usr/ucb/cc [ flag ... ] file ...
10       #include <sys/param.h>
11       #include <sys/types.h>
12       #include <sys/times.h>
13
14       int times(tmsp)
15       register struct tms *tmsp;
16
17

DESCRIPTION

19       The  times()  function returns time-accounting information for the cur‐
20       rent process and for the terminated  child  processes  of  the  current
21       process.   All  times  are reported in clock ticks. The number of clock
22       ticks per second is defined by  the  variable  CLK_TCK,  found  in  the
23       header <limits.h>.
24
25
26       A structure with the following members is returned by times():
27
28         time_t    tms_utime;    /* user time */
29         time_t    tms_stime;    /* system time */
30         time_t    tms_cutime;   /* user time, children */
31         time_t    tms_cstime;   /* system time, children */
32
33
34
35       The  children's  times  are the sum of the children's process times and
36       their children's times.
37

RETURN VALUES

39       Upon successful completion, times() returns 0.  Otherwise,  it  returns
40       −1.
41

SEE ALSO

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

NOTES

46       Use of these interfaces should be restricted to only applications writ‐
47       ten on BSD platforms.  Use of these interfaces with any of  the  system
48       libraries or in multi-threaded applications is unsupported.
49
50
51       The times() function has been superseded by getrusage(3C).
52
53
54
55SunOS 5.11                        30 Oct 2007                      times(3UCB)
Impressum