Added support for 64bit ticks (#3768)

Fixes #3017

Thanks to Hercules for the idea and their implementation of it.

This deprecates Windows XP support. If you want to use it to run your server on it, you have to forcefully enable it now.
Since 64bit ticks do not exist on XP, you might encounter some issues that are already fixed on other OS.
This commit is contained in:
Lemongrass3110
2018-12-21 00:02:19 +01:00
committed by GitHub
parent 0d816975f7
commit 01f61cfa4f
46 changed files with 495 additions and 424 deletions

View File

@@ -120,7 +120,7 @@ unsigned int auction_create(struct auction_data *auction)
else
{
struct auction_data *auction_;
unsigned int tick = auction->hours * 3600000;
t_tick tick = auction->hours * 3600000;
auction->item.amount = 1;
auction->item.identify = 1;
@@ -128,7 +128,7 @@ unsigned int auction_create(struct auction_data *auction)
auction->auction_id = (unsigned int)SqlStmt_LastInsertId(stmt);
auction->auction_end_timer = add_timer( gettick() + tick , auction_end_timer, auction->auction_id, 0);
ShowInfo("New Auction %u | time left %u ms | By %s.\n", auction->auction_id, tick, auction->seller_name);
ShowInfo("New Auction %u | time left %" PRtf " ms | By %s.\n", auction->auction_id, tick, auction->seller_name);
CREATE(auction_, struct auction_data, 1);
memcpy(auction_, auction, sizeof(struct auction_data));
@@ -191,7 +191,7 @@ void inter_auctions_fromsql(void)
int i;
char *data;
StringBuf buf;
unsigned int tick = gettick(), endtick;
t_tick tick = gettick(), endtick;
time_t now = time(NULL);
StringBuf_Init(&buf);