summaryrefslogtreecommitdiff
path: root/src/common/timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/timer.h')
-rw-r--r--src/common/timer.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/common/timer.h b/src/common/timer.h
index 57036ae01..81086cb70 100644
--- a/src/common/timer.h
+++ b/src/common/timer.h
@@ -3,6 +3,12 @@
#ifndef _TIMER_H_
#define _TIMER_H_
+#ifdef __WIN32
+/* We need winsock lib to have timeval struct - windows is weirdo */
+#define __USE_W32_SOCKETS
+#include <windows.h>
+#endif
+
#define BASE_TICK 5
#define TIMER_ONCE_AUTODEL 1
@@ -25,6 +31,10 @@ struct TimerData {
// Function prototype declaration
+#ifdef __WIN32
+void gettimeofday(struct timeval *t, void *dummy);
+#endif
+
unsigned int gettick_nocache(void);
unsigned int gettick(void);
@@ -36,9 +46,10 @@ int addtick_timer(int tid,unsigned int tick);
struct TimerData *get_timer(int tid);
int do_timer(unsigned int tick);
-void timer_final();
int add_timer_func_list(int (*)(int,unsigned int,int,int),char*);
char* search_timer_func_list(int (*)(int,unsigned int,int,int));
+void timer_final();
+
#endif // _TIMER_H_