1997-07-28 03:34:24 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* rusagestub.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* Stubs for getrusage(3).
|
1997-07-28 03:34:24 +02:00
|
|
|
*
|
|
|
|
*
|
2007-01-05 23:20:05 +01:00
|
|
|
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1997-07-28 03:34:24 +02:00
|
|
|
*
|
2007-01-05 23:20:05 +01:00
|
|
|
* $PostgreSQL: pgsql/src/include/rusagestub.h,v 1.18 2007/01/05 22:19:50 momjian Exp $
|
1997-07-28 03:34:24 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef RUSAGESTUB_H
|
|
|
|
#define RUSAGESTUB_H
|
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#include <sys/time.h> /* for struct timeval */
|
2003-05-15 18:35:30 +02:00
|
|
|
#ifndef WIN32
|
1997-09-07 07:04:48 +02:00
|
|
|
#include <sys/times.h> /* for struct tms */
|
2003-05-15 18:35:30 +02:00
|
|
|
#endif
|
1997-09-07 07:04:48 +02:00
|
|
|
#include <limits.h> /* for CLK_TCK */
|
1997-07-28 03:34:24 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#define RUSAGE_SELF 0
|
2005-07-27 14:44:10 +02:00
|
|
|
#define RUSAGE_CHILDREN (-1)
|
1997-07-28 03:34:24 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
struct rusage
|
|
|
|
{
|
1997-09-08 04:41:22 +02:00
|
|
|
struct timeval ru_utime; /* user time used */
|
|
|
|
struct timeval ru_stime; /* system time used */
|
1997-07-28 03:34:24 +02:00
|
|
|
};
|
|
|
|
|
1997-09-08 04:41:22 +02:00
|
|
|
extern int getrusage(int who, struct rusage * rusage);
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* RUSAGESTUB_H */
|