Update tk to version 8.5.13
[msysgit.git] / mingw / include / sys / time.h
blobb689d736b310de13afe5926d7c064117db332c23
1 #ifndef _SYS_TIME_H_
2 #define _SYS_TIME_H_
3 #include <time.h>
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
9 #ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */
10 #define _TIMEVAL_DEFINED
11 struct timeval {
12 long tv_sec;
13 long tv_usec;
15 #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
16 #define timercmp(tvp, uvp, cmp) \
17 (((tvp)->tv_sec != (uvp)->tv_sec) ? \
18 ((tvp)->tv_sec cmp (uvp)->tv_sec) : \
19 ((tvp)->tv_usec cmp (uvp)->tv_usec))
20 #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
21 #endif /* _TIMEVAL_DEFINED */
23 /* Provided for compatibility with code that assumes that
24 the presence of gettimeofday function implies a definition
25 of struct timezone. */
26 struct timezone
28 int tz_minuteswest; /* of Greenwich */
29 int tz_dsttime; /* type of dst correction to apply */
33 Implementation as per:
34 The Open Group Base Specifications, Issue 6
35 IEEE Std 1003.1, 2004 Edition
37 The timezone pointer arg is ignored. Errors are ignored.
38 */
39 int __cdecl __MINGW_NOTHROW gettimeofday(struct timeval *__restrict__,
40 void *__restrict__ /* tzp (unused) */);
42 #ifdef __cplusplus
44 #endif
47 #endif /* _SYS_TIME_H_ */