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
This commit is contained in:
parent
3daaf293cc
commit
fc5918e335
@ -79,7 +79,7 @@ unsigned int auction_create(struct auction_data *auction)
|
|||||||
if( !auction )
|
if( !auction )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
auction->timestamp = calc_times() + (auction->hours * 3600);
|
auction->timestamp = time(NULL) + (auction->hours * 3600);
|
||||||
|
|
||||||
StringBuf_Init(&buf);
|
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);
|
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;
|
struct item *item;
|
||||||
char *data;
|
char *data;
|
||||||
StringBuf buf;
|
StringBuf buf;
|
||||||
unsigned int tick = gettick(), endtick, now = calc_times();
|
unsigned int tick = gettick(), endtick, now = time(NULL);
|
||||||
|
|
||||||
StringBuf_Init(&buf);
|
StringBuf_Init(&buf);
|
||||||
StringBuf_AppendStr(&buf, "SELECT `auction_id`,`seller_id`,`seller_name`,`buyer_id`,`buyer_name`,"
|
StringBuf_AppendStr(&buf, "SELECT `auction_id`,`seller_id`,`seller_name`,`buyer_id`,`buyer_name`,"
|
||||||
|
@ -353,7 +353,7 @@ static void mapif_Mail_return(int fd, int char_id, int mail_id)
|
|||||||
safestrncpy(msg.title, temp_, MAIL_TITLE_LENGTH);
|
safestrncpy(msg.title, temp_, MAIL_TITLE_LENGTH);
|
||||||
|
|
||||||
msg.status = MAIL_NEW;
|
msg.status = MAIL_NEW;
|
||||||
msg.timestamp = calc_times();
|
msg.timestamp = time(NULL);
|
||||||
|
|
||||||
new_mail = mail_savemessage(&msg);
|
new_mail = mail_savemessage(&msg);
|
||||||
mapif_Mail_new(&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 )
|
if( item != NULL )
|
||||||
memcpy(&msg.item, item, sizeof(struct item));
|
memcpy(&msg.item, item, sizeof(struct item));
|
||||||
|
|
||||||
msg.timestamp = calc_times();
|
msg.timestamp = time(NULL);
|
||||||
|
|
||||||
mail_savemessage(&msg);
|
mail_savemessage(&msg);
|
||||||
mapif_Mail_new(&msg);
|
mapif_Mail_new(&msg);
|
||||||
|
@ -42,13 +42,6 @@ static int* timer_heap = NULL;
|
|||||||
// server startup time
|
// server startup time
|
||||||
time_t start_time;
|
time_t start_time;
|
||||||
|
|
||||||
unsigned int calc_times(void)
|
|
||||||
{
|
|
||||||
time_t temp = time(NULL);
|
|
||||||
|
|
||||||
return (unsigned int)mktime(localtime(&temp));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*----------------------------
|
/*----------------------------
|
||||||
* Timer debugging
|
* Timer debugging
|
||||||
*----------------------------*/
|
*----------------------------*/
|
||||||
|
@ -49,7 +49,6 @@ int settick_timer(int tid, unsigned int tick);
|
|||||||
int add_timer_func_list(TimerFunc func, char* name);
|
int add_timer_func_list(TimerFunc func, char* name);
|
||||||
|
|
||||||
unsigned long get_uptime(void);
|
unsigned long get_uptime(void);
|
||||||
unsigned int calc_times(void);
|
|
||||||
|
|
||||||
int do_timer(unsigned int tick);
|
int do_timer(unsigned int tick);
|
||||||
void timer_init(void);
|
void timer_init(void);
|
||||||
|
@ -11695,7 +11695,7 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd)
|
|||||||
else
|
else
|
||||||
memset(msg.body, 0x00, MAIL_BODY_LENGTH);
|
memset(msg.body, 0x00, MAIL_BODY_LENGTH);
|
||||||
|
|
||||||
msg.timestamp = calc_times();
|
msg.timestamp = time(NULL);
|
||||||
if( !intif_Mail_send(sd->status.account_id, &msg) )
|
if( !intif_Mail_send(sd->status.account_id, &msg) )
|
||||||
mail_deliveryfail(sd, &msg);
|
mail_deliveryfail(sd, &msg);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user