summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-17 15:03:03 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-17 15:03:03 +0000
commit372b71e5d7099373a20b14459182f9a3a05dbbba (patch)
treea53255abc00fe17d0b870d368cb0a7bed5aa2aa2 /src/common
parenta0d17427e9b773d175aca334f20fcffd56edf5d9 (diff)
downloadhercules-372b71e5d7099373a20b14459182f9a3a05dbbba.tar.gz
hercules-372b71e5d7099373a20b14459182f9a3a05dbbba.tar.bz2
hercules-372b71e5d7099373a20b14459182f9a3a05dbbba.tar.xz
hercules-372b71e5d7099373a20b14459182f9a3a05dbbba.zip
- Clean up of calc_times function.
- Moved to timer.c/h because it's used in both map and char servers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12382 54d463be-8e91-2dee-dedb-b68131a5f0ec
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);