summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/timer.c6
-rw-r--r--src/common/timer.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/common/timer.c b/src/common/timer.c
index 2c8236e3d..0eb16c45f 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -42,6 +42,12 @@ static int* timer_heap = NULL;
// server startup time
time_t start_time;
+unsigned int calc_times(void)
+{
+ time_t temp = time(NULL);
+
+ return (unsigned int)mktime(localtime(&temp));
+}
/*----------------------------
* Timer debugging
diff --git a/src/common/timer.h b/src/common/timer.h
index 4fa4a3c2d..7eedb689e 100644
--- a/src/common/timer.h
+++ b/src/common/timer.h
@@ -49,6 +49,7 @@ int settick_timer(int tid, unsigned int tick);
int add_timer_func_list(TimerFunc func, char* name);
unsigned long get_uptime(void);
+unsigned int calc_times(void);
int do_timer();
void timer_init(void);