time.h 935 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef _SYS_TIME_H
  2. #define _SYS_TIME_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /* All symbols from select.h except pselect are required anyway... */
  7. #include <sys/select.h>
  8. #define __NEED_time_t
  9. #define __NEED_suseconds_t
  10. #define __NEED_struct_timeval
  11. #include <bits/alltypes.h>
  12. int gettimeofday (struct timeval *, void *);
  13. #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
  14. #define ITIMER_REAL 0
  15. #define ITIMER_VIRTUAL 1
  16. #define ITIMER_PROF 2
  17. struct itimerval
  18. {
  19. struct timeval it_interval;
  20. struct timeval it_value;
  21. };
  22. int getitimer (int, struct itimerval *);
  23. int setitimer (int, const struct itimerval *, struct itimerval *);
  24. int utimes (const char *, const struct timeval [2]);
  25. #endif
  26. #ifdef _GNU_SOURCE
  27. int settimeofday (const struct timeval *, void *);
  28. int adjtime (const struct timeval *, struct timeval *);
  29. struct timezone {
  30. int tz_minuteswest;
  31. int tz_dsttime;
  32. };
  33. #endif
  34. #ifdef __cplusplus
  35. }
  36. #endif
  37. #endif