summaryrefslogtreecommitdiff
path: root/src/common/timer.h
diff options
context:
space:
mode:
authorshennetsind <notind@gmail.com>2013-05-17 11:08:38 -0700
committershennetsind <notind@gmail.com>2013-05-17 11:08:38 -0700
commit080f7a22740225df70a488849587b462a5d6b1a3 (patch)
tree0c1dc751af9f06e1ce3729d271de301f78a4e611 /src/common/timer.h
parent754af15505f32237f8063e51ae9a1cb90788dff4 (diff)
parent25e848f1a0f9317d63106cae048a1ef838411cb2 (diff)
downloadhercules-080f7a22740225df70a488849587b462a5d6b1a3.tar.gz
hercules-080f7a22740225df70a488849587b462a5d6b1a3.tar.bz2
hercules-080f7a22740225df70a488849587b462a5d6b1a3.tar.xz
hercules-080f7a22740225df70a488849587b462a5d6b1a3.zip
Merge pull request #1 from Earisu/master
updating, with earisu's
Diffstat (limited to 'src/common/timer.h')
-rw-r--r--src/common/timer.h34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/common/timer.h b/src/common/timer.h
index d45c73d12..902679f51 100644
--- a/src/common/timer.h
+++ b/src/common/timer.h
@@ -1,5 +1,6 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#ifndef _TIMER_H_
#define _TIMER_H_
@@ -35,23 +36,26 @@ struct TimerData {
// Function prototype declaration
-unsigned int gettick(void);
-unsigned int gettick_nocache(void);
+int do_timer(unsigned int tick);
+void timer_init(void);
+void timer_final(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);
+/* Hercules Renewal Phase One */
+unsigned int (*gettick) (void);
+unsigned int (*gettick_nocache) (void);
-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 timer_init(void);
-void timer_final(void);
+unsigned long (*get_uptime) (void);
+
+void timer_defaults(void);
#endif /* _TIMER_H_ */