summaryrefslogtreecommitdiff
path: root/thirdparty/libwebsockets/win32helpers/gettimeofday.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/libwebsockets/win32helpers/gettimeofday.h')
-rw-r--r--thirdparty/libwebsockets/win32helpers/gettimeofday.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/thirdparty/libwebsockets/win32helpers/gettimeofday.h b/thirdparty/libwebsockets/win32helpers/gettimeofday.h
new file mode 100644
index 0000000000..33e7a750fe
--- /dev/null
+++ b/thirdparty/libwebsockets/win32helpers/gettimeofday.h
@@ -0,0 +1,27 @@
+#ifndef _GET_TIME_OF_DAY_H
+#define _GET_TIME_OF_DAY_H
+
+#include <time.h>
+
+#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
+ #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64
+#else
+ #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
+#endif
+
+#ifdef LWS_MINGW_SUPPORT
+ #include <winsock2.h>
+#endif
+
+#ifndef _TIMEZONE_DEFINED
+struct timezone
+{
+ int tz_minuteswest; /* minutes W of Greenwich */
+ int tz_dsttime; /* type of dst correction */
+};
+
+#endif
+
+int gettimeofday(struct timeval *tv, struct timezone *tz);
+
+#endif