diff options
Diffstat (limited to 'src/common/timer.h')
-rw-r--r-- | src/common/timer.h | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/src/common/timer.h b/src/common/timer.h index 902679f51..d68b5ed0f 100644 --- a/src/common/timer.h +++ b/src/common/timer.h @@ -34,27 +34,36 @@ struct TimerData { intptr_t data; }; -// Function prototype declaration +/* Hercules Renewal Phase One */ +/*===================================== +* Interface : timer.h +* Generated by HerculesInterfaceMaker +* created by Susu +*-------------------------------------*/ +struct timer_interface { -int do_timer(unsigned int tick); -void timer_init(void); -void timer_final(void); + /* funcs */ + unsigned int (*gettick) (void); + unsigned int (*gettick_nocache) (void); -/* Hercules Renewal Phase One */ -unsigned int (*gettick) (void); -unsigned int (*gettick_nocache) (void); + int (*add_timer) (unsigned int tick, TimerFunc func, int id, intptr_t data); + int (*add_timer_interval) (unsigned int tick, TimerFunc func, int id, intptr_t data, int interval); + const struct TimerData *(*get_timer) (int tid); + int (*delete_timer) (int tid, TimerFunc func); + + int (*addtick_timer) (int tid, unsigned int tick); + int (*settick_timer) (int tid, unsigned int tick); -int (*add_timer) (unsigned int tick, TimerFunc func, int id, intptr_t data); -int (*add_timer_interval) (unsigned int tick, TimerFunc func, int id, intptr_t data, int interval); -const struct TimerData *(*get_timer) (int tid); -int (*delete_timer) (int tid, TimerFunc func); + int (*add_timer_func_list) (TimerFunc func, char* name); -int (*addtick_timer) (int tid, unsigned int tick); -int (*settick_timer) (int tid, unsigned int tick); + unsigned long (*get_uptime) (void); -int (*add_timer_func_list) (TimerFunc func, char* name); + int (*do_timer) (unsigned int tick); + void (*init) (void); + void (*final) (void); +} iTimer_s; -unsigned long (*get_uptime) (void); +struct timer_interface *iTimer; void timer_defaults(void); |