Initial import
[olsrd.git] / front-end / src / win32 / sys / time.h
1 #if !defined TL_SYS_TIME_H_INCLUDED
2
3 #define TL_SYS_TIME_H_INCLUDED
4
5 #define WIN32_LEAN_AND_MEAN
6 #include <winsock2.h>
7 #include <ws2tcpip.h>
8 #undef interface
9
10 #define timeradd(x, y, z)                       \
11   do                                            \
12   {                                             \
13     (z)->tv_sec = (x)->tv_sec + (y)->tv_sec;    \
14                                                 \
15     (z)->tv_usec = (x)->tv_usec + (y)->tv_usec; \
16                                                 \
17     if ((z)->tv_usec >= 1000000)                \
18     {                                           \
19       (z)->tv_sec++;                            \
20       (z)->tv_usec -= 1000000;                  \
21     }                                           \
22   }                                             \
23   while (0)
24
25 void gettimeofday(struct timeval *TVal, void *TZone);
26
27 #endif