diff options
author | shennetsind <notind@gmail.com> | 2013-06-08 12:46:37 -0700 |
---|---|---|
committer | shennetsind <notind@gmail.com> | 2013-06-08 12:46:37 -0700 |
commit | 9fdea24a67a39e86c2ae4dd032f08021b35942dc (patch) | |
tree | feea3cd428cee18be3da9bf0bee6d4570d9cad02 /src/common/timer.h | |
parent | b0f866ca419d87fcb3625b45e2437e0a0bb1810e (diff) | |
parent | d73783f22b2bb881aab74524d153d89a5932a199 (diff) | |
download | hercules-9fdea24a67a39e86c2ae4dd032f08021b35942dc.tar.gz hercules-9fdea24a67a39e86c2ae4dd032f08021b35942dc.tar.bz2 hercules-9fdea24a67a39e86c2ae4dd032f08021b35942dc.tar.xz hercules-9fdea24a67a39e86c2ae4dd032f08021b35942dc.zip |
Merge pull request #4 from Earisu/master
Attempt to Merge Earisu's Hercules
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); |