summaryrefslogtreecommitdiff
path: root/src/common/timer.h
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-05-15 16:47:08 -0300
committershennetsind <ind@henn.et>2013-05-15 16:47:08 -0300
commit0aee4fd57f2f4135361f4182a08a98cf52ed9d10 (patch)
treed7f43f0a5a63e73e21291f906e33109232ce7830 /src/common/timer.h
parent75942979098d34d52adc2537b6f28e02be7d7bae (diff)
downloadhercules-0aee4fd57f2f4135361f4182a08a98cf52ed9d10.tar.gz
hercules-0aee4fd57f2f4135361f4182a08a98cf52ed9d10.tar.bz2
hercules-0aee4fd57f2f4135361f4182a08a98cf52ed9d10.tar.xz
hercules-0aee4fd57f2f4135361f4182a08a98cf52ed9d10.zip
HPM Update
Made SQL and strlib functions HPM-friendly, special thanks to Yommy for bringing the issue up. Added partial map.c support, for the all-handy map[] array, beware that soon the whole map.c renewal design will be commit and when that happens your usage of map.c functions in plugins might require some updates. Signed-off-by: shennetsind <ind@henn.et>
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_ */