]>
Commit | Line | Data |
---|---|---|
3185942a | 1 | /* Copyright (C) 1991, 1992, 1996, 2008,2009 Free Software Foundation, Inc. |
bb70624e | 2 | |
3185942a | 3 | This file is part of GNU Bash, the Bourne Again SHell. |
bb70624e | 4 | |
3185942a JA |
5 | Bash is free software: you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | |
7 | the Free Software Foundation, either version 3 of the License, or | |
8 | (at your option) any later version. | |
9 | ||
10 | Bash is distributed in the hope that it will be useful, | |
bb70624e | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
3185942a JA |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | |
bb70624e | 14 | |
3185942a JA |
15 | You should have received a copy of the GNU General Public License |
16 | along with Bash. If not, see <http://www.gnu.org/licenses/>. | |
17 | */ | |
bb70624e JA |
18 | |
19 | /* | |
20 | * POSIX Standard: 4.5.2 Process Times <sys/times.h> | |
21 | */ | |
22 | ||
23 | /* | |
24 | * If we don't have a standard system clock_t type, this must be included | |
25 | * after config.h | |
26 | */ | |
27 | ||
28 | #ifndef _BASH_SYSTIMES_H | |
29 | #define _BASH_SYSTIMES_H 1 | |
30 | ||
31 | #if defined (HAVE_SYS_TIMES_H) | |
32 | # include <sys/times.h> | |
33 | #else /* !HAVE_SYS_TIMES_H */ | |
34 | ||
35 | #include <stdc.h> | |
36 | ||
37 | /* Structure describing CPU time used by a process and its children. */ | |
38 | struct tms | |
39 | { | |
40 | clock_t tms_utime; /* User CPU time. */ | |
41 | clock_t tms_stime; /* System CPU time. */ | |
42 | ||
43 | clock_t tms_cutime; /* User CPU time of dead children. */ | |
44 | clock_t tms_cstime; /* System CPU time of dead children. */ | |
45 | }; | |
46 | ||
47 | /* Store the CPU time used by this process and all its | |
ac50fbac | 48 | dead descendants in BUFFER. |
bb70624e JA |
49 | Return the elapsed real time from an arbitrary point in the |
50 | past (the bash emulation uses the epoch), or (clock_t) -1 for | |
51 | errors. All times are in CLK_TCKths of a second. */ | |
52 | extern clock_t times __P((struct tms *buffer)); | |
53 | ||
54 | #endif /* !HAVE_SYS_TIMES_H */ | |
55 | #endif /* _BASH_SYSTIMES_H */ |