2000-02-18 03:39:52 +08:00
|
|
|
#ifndef _SYS_RESOURCE_H_
|
|
|
|
#define _SYS_RESOURCE_H_
|
|
|
|
|
2022-09-27 01:20:08 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
#include <sys/time.h>
|
|
|
|
|
|
|
|
#define RUSAGE_SELF 0 /* calling process */
|
|
|
|
#define RUSAGE_CHILDREN -1 /* terminated child processes */
|
|
|
|
|
|
|
|
struct rusage {
|
|
|
|
struct timeval ru_utime; /* user time used */
|
|
|
|
struct timeval ru_stime; /* system time used */
|
|
|
|
};
|
|
|
|
|
2017-12-04 13:54:48 +08:00
|
|
|
int getrusage (int, struct rusage*);
|
2014-11-24 22:12:32 +08:00
|
|
|
|
2022-09-27 01:20:08 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
2000-02-18 03:39:52 +08:00
|
|
|
#endif
|
2022-09-27 01:20:08 +08:00
|
|
|
#endif /* !_SYS_RESOURCE_H_ */
|
2000-02-18 03:39:52 +08:00
|
|
|
|