blob: ec2d92f5a5a3ace04e7ba9f9dbb08e494ae0d36f [file] [log] [blame]
Jari Aalto31859422009-01-12 13:36:28 +00001/* Copyright (C) 1991, 1992, 1996, 2008,2009 Free Software Foundation, Inc.
Jari Aaltobb706242000-03-17 21:46:59 +00002
Jari Aalto31859422009-01-12 13:36:28 +00003 This file is part of GNU Bash, the Bourne Again SHell.
Jari Aaltobb706242000-03-17 21:46:59 +00004
Jari Aalto31859422009-01-12 13:36:28 +00005 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,
Jari Aaltobb706242000-03-17 21:46:59 +000011 but WITHOUT ANY WARRANTY; without even the implied warranty of
Jari Aalto31859422009-01-12 13:36:28 +000012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
Jari Aaltobb706242000-03-17 21:46:59 +000014
Jari Aalto31859422009-01-12 13:36:28 +000015 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*/
Jari Aaltobb706242000-03-17 21:46:59 +000018
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. */
38struct 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
Chet Rameyac50fba2014-02-26 09:36:43 -050048 dead descendants in BUFFER.
Jari Aaltobb706242000-03-17 21:46:59 +000049 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. */
52extern clock_t times __P((struct tms *buffer));
53
54#endif /* !HAVE_SYS_TIMES_H */
55#endif /* _BASH_SYSTIMES_H */