1TIMES(3C)                                                            TIMES(3C)
2
3
4

NAME

6       times - get process times
7

SYNOPSIS

9       #include <sys/types.h>
10       #include <sys/times.h>
11
12       times(buffer)
13       struct tms *buffer;
14

DESCRIPTION

16       This interface is obsoleted by getrusage(2).
17
18       Times  returns  time-accounting information for the current process and
19       for the terminated child processes of the current process.   All  times
20       are in 1/HZ seconds, where HZ is 60.
21
22       This is the structure returned by times:
23
24       /* Copyright (C) 1991, 1992, 1996, 1998, 1999 Free Software Foundation, Inc.
25          This file is part of the GNU C Library.
26
27          The GNU C Library is free software; you can redistribute it and/or
28          modify it under the terms of the GNU Lesser General Public
29          License as published by the Free Software Foundation; either
30          version 2.1 of the License, or (at your option) any later version.
31
32          The GNU C Library is distributed in the hope that it will be useful,
33          but WITHOUT ANY WARRANTY; without even the implied warranty of
34          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35          Lesser General Public License for more details.
36
37          You should have received a copy of the GNU Lesser General Public
38          License along with the GNU C Library; if not, see
39          <http://www.gnu.org/licenses/>.  */
40
41       /*
42        *   POSIX Standard: 4.5.2 Process Times     <sys/times.h>
43        */
44
45       #ifndef   _SYS_TIMES_H
46       #define   _SYS_TIMES_H   1
47
48       #include <features.h>
49
50       #define   __need_clock_t
51       #include <time.h>
52
53
54       __BEGIN_DECLS
55
56       /* Structure describing CPU time used by a process and its children.  */
57       struct tms
58         {
59           clock_t tms_utime;        /* User CPU time.  */
60           clock_t tms_stime;        /* System CPU time.  */
61
62           clock_t tms_cutime;       /* User CPU time of dead children.  */
63           clock_t tms_cstime;       /* System CPU time of dead children.  */
64         };
65
66
67       /* Store the CPU time used by this process and all its
68          dead children (and their dead children) in BUFFER.
69          Return the elapsed real time, or (clock_t) -1 for errors.
70          All times are in CLK_TCKths of a second.  */
71       extern clock_t times (struct tms *__buffer) __THROW;
72
73       __END_DECLS
74
75       #endif /* sys/times.h    */
76
77       The  children  times  are  the  sum of the children's process times and
78       their children's times.
79

SEE ALSO

81       time(1), getrusage(2), wait3(2), time(3)
82
83
84
854th Berkeley Distribution         May 9, 1985                        TIMES(3C)
Impressum