| 1 | /* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
|
|---|
| 2 | This file is part of the GNU C Library.
|
|---|
| 3 |
|
|---|
| 4 | The GNU C Library is free software; you can redistribute it and/or
|
|---|
| 5 | modify it under the terms of the GNU Library General Public License as
|
|---|
| 6 | published by the Free Software Foundation; either version 2 of the
|
|---|
| 7 | License, or (at your option) any later version.
|
|---|
| 8 |
|
|---|
| 9 | The GNU C Library is distributed in the hope that it will be useful,
|
|---|
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|---|
| 12 | Library General Public License for more details.
|
|---|
| 13 |
|
|---|
| 14 | You should have received a copy of the GNU Library General Public
|
|---|
| 15 | License along with the GNU C Library; see the file COPYING.LIB. If not,
|
|---|
| 16 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|---|
| 17 | Boston, MA 02111-1307, USA. */
|
|---|
| 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
|
|---|
| 48 | dead descendents in BUFFER.
|
|---|
| 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 */
|
|---|