osal_win32.h
Go to the documentation of this file.
1 /******************************************************************************
2  * * *** ***
3  * *** *** ***
4  * *** **** ********** *** ***** *** **** *****
5  * ********* ********** *** ********* ************ *********
6  * **** *** *** *** *** **** ***
7  * *** *** ****** *** *********** *** **** *****
8  * *** *** ****** *** ************* *** **** *****
9  * *** **** **** *** *** *** **** ***
10  * *** ******* ***** ************** ************* *********
11  * *** ***** *** ******* ** ** ****** *****
12  * t h e r e a l t i m e t a r g e t e x p e r t s
13  *
14  * http://www.rt-labs.com
15  * Copyright (C) 2009. rt-labs AB, Sweden. All rights reserved.
16  *------------------------------------------------------------------------------
17  * $Id: osal_win32.h 414 2012-12-03 10:48:42Z rtlaka $
18  *------------------------------------------------------------------------------
19  */
20 
21 #ifndef _osal_win32_
22 #define _osal_win32_
23 
24 /* Convenience macros for operations on timevals.
25  NOTE: `timercmp' does not work for >= or <=. */
26 # define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
27 # define timeradd(a, b, result) \
28  do { \
29  (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \
30  (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \
31  if ((result)->tv_usec >= 1000000) \
32  { \
33  ++(result)->tv_sec; \
34  (result)->tv_usec -= 1000000; \
35  } \
36  } while (0)
37 # define timersub(a, b, result) \
38  do { \
39  (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
40  (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
41  if ((result)->tv_usec < 0) { \
42  --(result)->tv_sec; \
43  (result)->tv_usec += 1000000; \
44  } \
45  } while (0)
46 
47 int osal_gettimeofday (struct timeval *tv, struct timezone *tz);
48 
49 #endif
int osal_gettimeofday(struct timeval *tv, struct timezone *tz)
Definition: linux/osal.c:37


youbot_driver
Author(s): Jan Paulus
autogenerated on Mon Jun 10 2019 15:46:24