diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-17 12:07:25 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-17 12:07:25 +0000 |
commit | ffe08e80828f0f8f92c7ae2b94a29eca4ab3efc8 (patch) | |
tree | 943f44acd7cb9ff5e811bf55ce5deda15716ef29 /src/common/timer.h | |
parent | f6b6bc970a7a07287dc076abdc4dfaa848cd0c70 (diff) | |
download | hercules-ffe08e80828f0f8f92c7ae2b94a29eca4ab3efc8.tar.gz hercules-ffe08e80828f0f8f92c7ae2b94a29eca4ab3efc8.tar.bz2 hercules-ffe08e80828f0f8f92c7ae2b94a29eca4ab3efc8.tar.xz hercules-ffe08e80828f0f8f92c7ae2b94a29eca4ab3efc8.zip |
* small timer.c cleaning
- removed "with less than 4 values, it's speedier to use a simple loop" as this case will never occur (premature optimization from r1284)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11499 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/timer.h')
-rw-r--r-- | src/common/timer.h | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/common/timer.h b/src/common/timer.h index cbefbe158..e007e9611 100644 --- a/src/common/timer.h +++ b/src/common/timer.h @@ -8,18 +8,11 @@ #include "../common/cbasetypes.h" #endif -#ifdef WIN32 -/* We need winsock lib to have timeval struct - windows is weirdo */ -//#define __USE_W32_SOCKETS -//#include <windows.h> -#include <winsock2.h> -#endif - #define BASE_TICK 5 -#define TIMER_ONCE_AUTODEL 0x1 -#define TIMER_INTERVAL 0x2 -#define TIMER_REMOVE_HEAP 0x10 +#define TIMER_ONCE_AUTODEL 0x01 +#define TIMER_INTERVAL 0x02 +#define TIMER_REMOVE_HEAP 0x10 #define DIFF_TICK(a,b) ((int)((a)-(b))) @@ -41,12 +34,8 @@ struct TimerData { // Function prototype declaration -#if defined(TICK_CACHE) && TICK_CACHE > 1 -unsigned int gettick_nocache(void); -#else -#define gettick_nocache gettick -#endif unsigned int gettick(void); +unsigned int gettick_nocache(void); int add_timer(unsigned int,TimerFunc f,int,int); int add_timer_interval(unsigned int tick, TimerFunc func, int id, int data, int interval); |