win32/include/winapi changes from https://github.com/run4flat/tinycc.git
[tinycc.git] / win32 / include / winapi / _timeval.h
blob407e7881eb19fe3e3f0b0d9b627b8ebc26d20408
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
7 #ifndef _TIMEVAL_DEFINED
8 #define _TIMEVAL_DEFINED
10 struct timeval
12 long tv_sec;
13 long tv_usec;
16 #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
17 #define timercmp(tvp,uvp,cmp) \
18 ((tvp)->tv_sec cmp (uvp)->tv_sec || \
19 ((tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec))
20 #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
22 #endif /* _TIMEVAL_DEFINED */