summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-27 19:46:17 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-27 19:46:17 +0000
commit0f3c97f0852fcdd43011cd3550449e5ab6037e66 (patch)
treee87dc2c6715a4931951275f19c559f993428714c /src
parentfca8c29c0775ff371526ad9d4cf58d541bd7abb6 (diff)
downloadhercules-0f3c97f0852fcdd43011cd3550449e5ab6037e66.tar.gz
hercules-0f3c97f0852fcdd43011cd3550449e5ab6037e66.tar.bz2
hercules-0f3c97f0852fcdd43011cd3550449e5ab6037e66.tar.xz
hercules-0f3c97f0852fcdd43011cd3550449e5ab6037e66.zip
Removed the calc_times() no-op (bugreport:1289)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12668 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/char_sql/int_auction.c4
-rw-r--r--src/char_sql/int_mail.c4
-rw-r--r--src/common/timer.c7
-rw-r--r--src/common/timer.h1
-rw-r--r--src/map/clif.c2
5 files changed, 5 insertions, 13 deletions
diff --git a/src/char_sql/int_auction.c b/src/char_sql/int_auction.c
index ca99086c7..e29e01e7a 100644
--- a/src/char_sql/int_auction.c
+++ b/src/char_sql/int_auction.c
@@ -79,7 +79,7 @@ unsigned int auction_create(struct auction_data *auction)
if( !auction )
return false;
- auction->timestamp = calc_times() + (auction->hours * 3600);
+ auction->timestamp = time(NULL) + (auction->hours * 3600);
StringBuf_Init(&buf);
StringBuf_Printf(&buf, "INSERT INTO `%s` (`seller_id`,`seller_name`,`buyer_id`,`buyer_name`,`price`,`buynow`,`hours`,`timestamp`,`nameid`,`item_name`,`type`,`refine`,`attribute`", auction_db);
@@ -177,7 +177,7 @@ void inter_auctions_fromsql(void)
struct item *item;
char *data;
StringBuf buf;
- unsigned int tick = gettick(), endtick, now = calc_times();
+ unsigned int tick = gettick(), endtick, now = time(NULL);
StringBuf_Init(&buf);
StringBuf_AppendStr(&buf, "SELECT `auction_id`,`seller_id`,`seller_name`,`buyer_id`,`buyer_name`,"
diff --git a/src/char_sql/int_mail.c b/src/char_sql/int_mail.c
index 963647200..a70b30b99 100644
--- a/src/char_sql/int_mail.c
+++ b/src/char_sql/int_mail.c
@@ -353,7 +353,7 @@ static void mapif_Mail_return(int fd, int char_id, int mail_id)
safestrncpy(msg.title, temp_, MAIL_TITLE_LENGTH);
msg.status = MAIL_NEW;
- msg.timestamp = calc_times();
+ msg.timestamp = time(NULL);
new_mail = mail_savemessage(&msg);
mapif_Mail_new(&msg);
@@ -438,7 +438,7 @@ void mail_sendmail(int send_id, const char* send_name, int dest_id, const char*
if( item != NULL )
memcpy(&msg.item, item, sizeof(struct item));
- msg.timestamp = calc_times();
+ msg.timestamp = time(NULL);
mail_savemessage(&msg);
mapif_Mail_new(&msg);
diff --git a/src/common/timer.c b/src/common/timer.c
index 183daad30..b76a82da6 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -42,13 +42,6 @@ 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 7a3dba4a8..28a792f88 100644
--- a/src/common/timer.h
+++ b/src/common/timer.h
@@ -49,7 +49,6 @@ 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(unsigned int tick);
void timer_init(void);
diff --git a/src/map/clif.c b/src/map/clif.c
index 4e6637a5e..985871cc7 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11695,7 +11695,7 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd)
else
memset(msg.body, 0x00, MAIL_BODY_LENGTH);
- msg.timestamp = calc_times();
+ msg.timestamp = time(NULL);
if( !intif_Mail_send(sd->status.account_id, &msg) )
mail_deliveryfail(sd, &msg);