time.h 894 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. /* extensions */
  14. int settimeofday (const struct timeval *, void *);
  15. int adjtime (const struct timeval *, struct timeval *);
  16. #define ITIMER_REAL 0
  17. #define ITIMER_VIRTUAL 1
  18. #define ITIMER_PROF 2
  19. struct itimerval
  20. {
  21. struct timeval it_interval;
  22. struct timeval it_value;
  23. };
  24. int getitimer (int, struct itimerval *);
  25. int setitimer (int, const struct itimerval *, struct itimerval *);
  26. int utimes (const char *, const struct timeval [2]);
  27. #ifdef _GNU_SOURCE
  28. struct timezone {
  29. int tz_minuteswest;
  30. int tz_dsttime;
  31. };
  32. #endif
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. #endif