rusagestub.h 846 B

12345678910111213141516171819202122232425262728293031323334
  1. /*-------------------------------------------------------------------------
  2. *
  3. * rusagestub.h
  4. * Stubs for getrusage(3).
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  8. * Portions Copyright (c) 1994, Regents of the University of California
  9. *
  10. * src/include/rusagestub.h
  11. *
  12. *-------------------------------------------------------------------------
  13. */
  14. #ifndef RUSAGESTUB_H
  15. #define RUSAGESTUB_H
  16. #include <sys/time.h> /* for struct timeval */
  17. #ifndef WIN32
  18. #include <sys/times.h> /* for struct tms */
  19. #endif
  20. #include <limits.h> /* for CLK_TCK */
  21. #define RUSAGE_SELF 0
  22. #define RUSAGE_CHILDREN (-1)
  23. struct rusage
  24. {
  25. struct timeval ru_utime; /* user time used */
  26. struct timeval ru_stime; /* system time used */
  27. };
  28. extern int getrusage(int who, struct rusage *rusage);
  29. #endif /* RUSAGESTUB_H */