mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix wait time on windows (Thanks to Tobii)
This commit is contained in:
parent
36a9c00aed
commit
eba1fb5b8b
|
@ -1727,15 +1727,18 @@ int CServer::Run()
|
|||
if(g_Config.m_SvShutdownWhenEmpty)
|
||||
m_RunServer = false;
|
||||
else
|
||||
net_socket_read_wait(m_NetServer.Socket(), 1000000);
|
||||
net_socket_read_wait(m_NetServer.Socket(), time_freq());
|
||||
}
|
||||
else
|
||||
{
|
||||
set_new_tick();
|
||||
int64 t = time_get();
|
||||
int x = TickStartTime(m_CurrentGameTick+1) - t + 1;
|
||||
int x = (TickStartTime(m_CurrentGameTick+1) - t) * 1000000 / time_freq() + 1;
|
||||
|
||||
if(x > 0)
|
||||
{
|
||||
net_socket_read_wait(m_NetServer.Socket(), x);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue