time.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _SYS_TIME_H_
  7. #define _SYS_TIME_H_
  8. #include <time.h>
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #include <_timeval.h>
  13. #ifndef _TIMEZONE_DEFINED /* also in sys/time.h */
  14. #define _TIMEZONE_DEFINED
  15. /* Provided for compatibility with code that assumes that
  16. the presence of gettimeofday function implies a definition
  17. of struct timezone. */
  18. struct timezone
  19. {
  20. int tz_minuteswest; /* of Greenwich */
  21. int tz_dsttime; /* type of dst correction to apply */
  22. };
  23. extern int __cdecl mingw_gettimeofday (struct timeval *p, struct timezone *z);
  24. #endif /* _TIMEZONE_DEFINED */
  25. /*
  26. Implementation as per:
  27. The Open Group Base Specifications, Issue 6
  28. IEEE Std 1003.1, 2004 Edition
  29. The timezone pointer arg is ignored. Errors are ignored.
  30. */
  31. #ifndef _GETTIMEOFDAY_DEFINED
  32. #define _GETTIMEOFDAY_DEFINED
  33. int __cdecl gettimeofday(struct timeval *__restrict__,
  34. void *__restrict__ /* tzp (unused) */);
  35. #endif
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. /* Adding timespec definition. */
  40. #include <sys/timeb.h>
  41. #endif /* _SYS_TIME_H_ */