osal_win32.h
Go to the documentation of this file.
1 /*
2  * Licensed under the GNU General Public License version 2 with exceptions. See
3  * LICENSE file in the project root for full license information
4  */
5 
6 #ifndef _osal_win32_
7 #define _osal_win32_
8 
9 /* Convenience macros for operations on timevals.
10  NOTE: `timercmp' does not work for >= or <=. */
11 # define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
12 # define timeradd(a, b, result) \
13  do { \
14  (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \
15  (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \
16  if ((result)->tv_usec >= 1000000) \
17  { \
18  ++(result)->tv_sec; \
19  (result)->tv_usec -= 1000000; \
20  } \
21  } while (0)
22 # define timersub(a, b, result) \
23  do { \
24  (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
25  (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
26  if ((result)->tv_usec < 0) { \
27  --(result)->tv_sec; \
28  (result)->tv_usec += 1000000; \
29  } \
30  } while (0)
31 
32 int osal_gettimeofday (struct timeval *tv, struct timezone *tz);
33 
34 #endif
osal_gettimeofday
int osal_gettimeofday(struct timeval *tv, struct timezone *tz)
Definition: erika/osal.c:28


soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Wed Mar 2 2022 01:01:49