summaryrefslogtreecommitdiff
path: root/libusb/os/poll_windows.h
diff options
context:
space:
mode:
Diffstat (limited to 'libusb/os/poll_windows.h')
-rw-r--r--libusb/os/poll_windows.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/libusb/os/poll_windows.h b/libusb/os/poll_windows.h
index c78c9d3..b2c94f9 100644
--- a/libusb/os/poll_windows.h
+++ b/libusb/os/poll_windows.h
@@ -67,23 +67,16 @@ int usbi_close(int fd);
/*
* Timeval operations
*/
-#if !defined(TIMESPEC_TO_TIMEVAL)
-#define TIMESPEC_TO_TIMEVAL(tv, ts) \
-do { \
- (tv)->tv_sec = (long)(ts)->tv_sec; \
- (tv)->tv_usec = (long)(ts)->tv_nsec / 1000; \
-} while (0)
-#endif
#if !defined(timersub)
-#define timersub(a, b, result) \
-do { \
- (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
- (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
- if ((result)->tv_usec < 0) { \
- --(result)->tv_sec; \
- (result)->tv_usec += 1000000; \
- } \
-} while (0)
+#define timersub(a, b, result) \
+ do { \
+ (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
+ (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
+ if ((result)->tv_usec < 0L) { \
+ --(result)->tv_sec; \
+ (result)->tv_usec += 1000000L; \
+ } \
+ } while (0)
#endif
#endif