mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #8333 from BlaiZephyr/change-time-timestamp-type
Change type from int to int64_t
This commit is contained in:
commit
60dbd73ee3
|
@ -2613,7 +2613,7 @@ int net_socket_read_wait(NETSOCKET sock, int time)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int time_timestamp()
|
||||
int64_t time_timestamp()
|
||||
{
|
||||
return time(0);
|
||||
}
|
||||
|
|
|
@ -698,7 +698,7 @@ int64_t time_freq();
|
|||
*
|
||||
* @return The time as a UNIX timestamp
|
||||
*/
|
||||
int time_timestamp();
|
||||
int64_t time_timestamp();
|
||||
|
||||
/**
|
||||
* Retrieves the hours since midnight (0..23)
|
||||
|
|
|
@ -217,7 +217,7 @@ int CNetBan::Ban(T *pBanPool, const typename T::CDataType *pData, int Seconds, c
|
|||
return -1;
|
||||
}
|
||||
|
||||
int Stamp = Seconds > 0 ? time_timestamp() + Seconds : CBanInfo::EXPIRES_NEVER;
|
||||
int64_t Stamp = Seconds > 0 ? time_timestamp() + Seconds : static_cast<int64_t>(CBanInfo::EXPIRES_NEVER);
|
||||
|
||||
// set up info
|
||||
CBanInfo Info = {0};
|
||||
|
@ -290,7 +290,7 @@ void CNetBan::Init(IConsole *pConsole, IStorage *pStorage)
|
|||
|
||||
void CNetBan::Update()
|
||||
{
|
||||
int Now = time_timestamp();
|
||||
int64_t Now = time_timestamp();
|
||||
|
||||
// remove expired bans
|
||||
char aBuf[256], aNetStr[256];
|
||||
|
@ -522,7 +522,7 @@ void CNetBan::ConBansSave(IConsole::IResult *pResult, void *pUser)
|
|||
return;
|
||||
}
|
||||
|
||||
int Now = time_timestamp();
|
||||
int64_t Now = time_timestamp();
|
||||
char aAddrStr1[NETADDR_MAXSTRSIZE], aAddrStr2[NETADDR_MAXSTRSIZE];
|
||||
for(CBanAddr *pBan = pThis->m_BanAddrPool.First(); pBan; pBan = pBan->m_pNext)
|
||||
{
|
||||
|
|
|
@ -79,7 +79,7 @@ protected:
|
|||
EXPIRES_NEVER = -1,
|
||||
REASON_LENGTH = 64,
|
||||
};
|
||||
int m_Expires;
|
||||
int64_t m_Expires;
|
||||
char m_aReason[REASON_LENGTH];
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue