Embed:
(wiki syntax)
Show/hide line numbers
time.h
00001 #ifndef _SYS_TIME_H_ 00002 #define _SYS_TIME_H_ 00003 #include <time.h> 00004 00005 #ifdef __cplusplus 00006 extern "C" { 00007 #endif 00008 00009 #ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */ 00010 #define _TIMEVAL_DEFINED 00011 struct timeval { 00012 long tv_sec; 00013 long tv_usec; 00014 }; 00015 #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) 00016 #define timercmp(tvp, uvp, cmp) \ 00017 (((tvp)->tv_sec != (uvp)->tv_sec) ? \ 00018 ((tvp)->tv_sec cmp (uvp)->tv_sec) : \ 00019 ((tvp)->tv_usec cmp (uvp)->tv_usec)) 00020 #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 00021 #endif /* _TIMEVAL_DEFINED */ 00022 00023 /* Provided for compatibility with code that assumes that 00024 the presence of gettimeofday function implies a definition 00025 of struct timezone. */ 00026 struct timezone 00027 { 00028 int tz_minuteswest; /* of Greenwich */ 00029 int tz_dsttime; /* type of dst correction to apply */ 00030 }; 00031 00032 /* 00033 Implementation as per: 00034 The Open Group Base Specifications, Issue 6 00035 IEEE Std 1003.1, 2004 Edition 00036 00037 The timezone pointer arg is ignored. Errors are ignored. 00038 */ 00039 int __cdecl __MINGW_NOTHROW gettimeofday(struct timeval *__restrict__, 00040 void *__restrict__ /* tzp (unused) */); 00041 00042 #ifdef __cplusplus 00043 } 00044 #endif 00045 00046 00047 #endif /* _SYS_TIME_H_ */
Generated on Tue Jul 12 2022 19:59:55 by
1.7.2