ReactOS 0.4.16-dev-336-gb667d82
time.h
Go to the documentation of this file.
1
7#ifndef _SYS_TIME_H_
8#define _SYS_TIME_H_
9
10#include <time.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#ifndef __STRICT_ANSI__
17#ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */
18#define _TIMEVAL_DEFINED
19struct timeval {
20 long tv_sec;
21 long tv_usec;
22};
23#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
24#define timercmp(tvp, uvp, cmp) \
25 (((tvp)->tv_sec != (uvp)->tv_sec) ? \
26 ((tvp)->tv_sec cmp (uvp)->tv_sec) : \
27 ((tvp)->tv_usec cmp (uvp)->tv_usec))
28#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
29#endif /* _TIMEVAL_DEFINED */
30
31#ifndef _TIMEZONE_DEFINED /* also in sys/time.h */
32#define _TIMEZONE_DEFINED
33/* Provided for compatibility with code that assumes that
34 the presence of gettimeofday function implies a definition
35 of struct timezone. */
36struct timezone
37{
38 int tz_minuteswest; /* of Greenwich */
39 int tz_dsttime; /* type of dst correction to apply */
40};
41
42 extern int __cdecl mingw_gettimeofday (struct timeval *p, struct timezone *z);
43
44#endif
45
46/*
47 Implementation as per:
48 The Open Group Base Specifications, Issue 6
49 IEEE Std 1003.1, 2004 Edition
50
51 The timezone pointer arg is ignored. Errors are ignored.
52*/
53#ifndef _GETTIMEOFDAY_DEFINED
54#define _GETTIMEOFDAY_DEFINED
55int __cdecl gettimeofday(struct timeval *__restrict__,
56 void *__restrict__ /* tzp (unused) */);
57#endif
58
59#endif /* __STRICT_ANSI__ */
60
61#ifdef __cplusplus
62}
63#endif
64
65/* Adding timespec definition. */
66#include <sys/timeb.h>
67
68
69#endif /* _SYS_TIME_H_ */
#define __cdecl
Definition: accygwin.h:79
#define gettimeofday(tv, tz)
Definition: adns_win32.h:159
GLfloat GLfloat p
Definition: glext.h:8902
GLdouble GLdouble z
Definition: glext.h:5874
int __cdecl mingw_gettimeofday(struct timeval *p, struct timezone *z)
long tv_sec
Definition: time.h:20
long tv_usec
Definition: time.h:21
Definition: fake.h:14
int tz_minuteswest
Definition: fake.h:15
int tz_dsttime
Definition: fake.h:16