Update copyright for 2022
[pgsql.git] / src / include / utils / pg_rusage.h
bloba6344abd1071121ed9e52f997c4fdae3ff9f44cc
1 /*-------------------------------------------------------------------------
3 * pg_rusage.h
4 * header file for resource usage measurement support routines
7 * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/utils/pg_rusage.h
12 *-------------------------------------------------------------------------
14 #ifndef PG_RUSAGE_H
15 #define PG_RUSAGE_H
17 #include <sys/time.h>
19 #ifdef HAVE_SYS_RESOURCE_H
20 #include <sys/resource.h>
21 #else
22 #include "rusagestub.h"
23 #endif
26 /* State structure for pg_rusage_init/pg_rusage_show */
27 typedef struct PGRUsage
29 struct timeval tv;
30 struct rusage ru;
31 } PGRUsage;
34 extern void pg_rusage_init(PGRUsage *ru0);
35 extern const char *pg_rusage_show(const PGRUsage *ru0);
37 #endif /* PG_RUSAGE_H */