Fix wait time on windows (Thanks to Tobii)

This commit is contained in:
def 2014-11-15 18:14:20 +01:00
parent 36a9c00aed
commit eba1fb5b8b

View file

@ -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);
}
}
}
}