From bdb9b86170175ac6c98b8c9b1034312a84487f41 Mon Sep 17 00:00:00 2001 From: Lupus Date: Thu, 24 Mar 2005 17:18:26 +0000 Subject: timers optimization / speed up / bug fix : no freezing mobs ported from Yor's git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1284 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/timer.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/common/timer.h') 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 +#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_ -- cgit v1.2.3-70-g09d2