Committer:
sca8er
Date:
Mon Mar 05 04:56:58 2012 +0000
Revision:
3:0c3bcea5b4d0

        

Who changed what in which revision?

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