Bläddra i källkod

Removed the calc_times() no-op (bugreport:1289)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12668 54d463be-8e91-2dee-dedb-b68131a5f0ec
ultramage 17 år sedan
förälder
incheckning
fc5918e335
5 ändrade filer med 5 tillägg och 13 borttagningar
  1. 2 2
      src/char_sql/int_auction.c
  2. 2 2
      src/char_sql/int_mail.c
  3. 0 7
      src/common/timer.c
  4. 0 1
      src/common/timer.h
  5. 1 1
      src/map/clif.c

+ 2 - 2
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`,"

+ 2 - 2
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);

+ 0 - 7
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
  *----------------------------*/

+ 0 - 1
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);

+ 1 - 1
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);