Last change
on this file since 1089 was 1046, checked in by alloc, 8 years ago |
Daodan: Added Windows MinGW and build batch file
|
File size:
1.1 KB
|
Line | |
---|
1 | #ifndef _SYS_TIME_H_
|
---|
2 | #define _SYS_TIME_H_
|
---|
3 | #include <time.h>
|
---|
4 |
|
---|
5 | #ifdef __cplusplus
|
---|
6 | extern "C" {
|
---|
7 | #endif
|
---|
8 |
|
---|
9 | #ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */
|
---|
10 | #define _TIMEVAL_DEFINED
|
---|
11 | struct timeval {
|
---|
12 | long tv_sec;
|
---|
13 | long tv_usec;
|
---|
14 | };
|
---|
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 */
|
---|
22 |
|
---|
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
|
---|
27 | {
|
---|
28 | int tz_minuteswest; /* of Greenwich */
|
---|
29 | int tz_dsttime; /* type of dst correction to apply */
|
---|
30 | };
|
---|
31 |
|
---|
32 | /*
|
---|
33 | Implementation as per:
|
---|
34 | The Open Group Base Specifications, Issue 6
|
---|
35 | IEEE Std 1003.1, 2004 Edition
|
---|
36 |
|
---|
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) */);
|
---|
41 |
|
---|
42 | #ifdef __cplusplus
|
---|
43 | }
|
---|
44 | #endif
|
---|
45 |
|
---|
46 |
|
---|
47 | #endif /* _SYS_TIME_H_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.