mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Use API identical to std classes where possible
This commit is contained in:
@ -231,7 +231,7 @@ void CServerHandler::startLocalServerAndConnect()
|
||||
while(!androidTestServerReadyFlag.load())
|
||||
{
|
||||
logNetwork->info("still waiting...");
|
||||
boost::this_thread::sleep(boost::posix_time::milliseconds(1000));
|
||||
boost::this_thread::sleep_for(boost::chrono::milliseconds(1000));
|
||||
}
|
||||
logNetwork->info("waiting for server finished...");
|
||||
androidTestServerReadyFlag = false;
|
||||
@ -261,7 +261,7 @@ void CServerHandler::justConnectToServer(const std::string & addr, const ui16 po
|
||||
catch(std::runtime_error & error)
|
||||
{
|
||||
logNetwork->warn("\nCannot establish connection. %s Retrying in 1 second", error.what());
|
||||
boost::this_thread::sleep(boost::posix_time::seconds(1));
|
||||
boost::this_thread::sleep_for(boost::chrono::milliseconds(1000));
|
||||
}
|
||||
}
|
||||
|
||||
@ -307,7 +307,7 @@ void CServerHandler::stopServerConnection()
|
||||
{
|
||||
if(c->handler)
|
||||
{
|
||||
while(!c->handler->timed_join(boost::posix_time::milliseconds(50)))
|
||||
while(!c->handler->timed_join(boost::chrono::milliseconds(50)))
|
||||
applyPacksOnLobbyScreen();
|
||||
c->handler->join();
|
||||
}
|
||||
@ -761,20 +761,20 @@ void CServerHandler::debugStartTest(std::string filename, bool save)
|
||||
else
|
||||
startLocalServerAndConnect();
|
||||
|
||||
boost::this_thread::sleep(boost::posix_time::milliseconds(100));
|
||||
boost::this_thread::sleep_for(boost::chrono::milliseconds(100));
|
||||
|
||||
while(!settings["session"]["headless"].Bool() && !GH.windows().topWindow<CLobbyScreen>())
|
||||
boost::this_thread::sleep(boost::posix_time::milliseconds(50));
|
||||
boost::this_thread::sleep_for(boost::chrono::milliseconds(50));
|
||||
|
||||
while(!mi || mapInfo->fileURI != CSH->mi->fileURI)
|
||||
{
|
||||
setMapInfo(mapInfo);
|
||||
boost::this_thread::sleep(boost::posix_time::milliseconds(50));
|
||||
boost::this_thread::sleep_for(boost::chrono::milliseconds(50));
|
||||
}
|
||||
// "Click" on color to remove us from it
|
||||
setPlayer(myFirstColor());
|
||||
while(myFirstColor() != PlayerColor::CANNOT_DETERMINE)
|
||||
boost::this_thread::sleep(boost::posix_time::milliseconds(50));
|
||||
boost::this_thread::sleep_for(boost::chrono::milliseconds(50));
|
||||
|
||||
while(true)
|
||||
{
|
||||
@ -787,7 +787,7 @@ void CServerHandler::debugStartTest(std::string filename, bool save)
|
||||
{
|
||||
|
||||
}
|
||||
boost::this_thread::sleep(boost::posix_time::milliseconds(50));
|
||||
boost::this_thread::sleep_for(boost::chrono::milliseconds(50));
|
||||
}
|
||||
}
|
||||
|
||||
@ -826,7 +826,7 @@ void CServerHandler::threadHandleConnection()
|
||||
while(c->connected)
|
||||
{
|
||||
while(state == EClientState::STARTING)
|
||||
boost::this_thread::sleep(boost::posix_time::milliseconds(10));
|
||||
boost::this_thread::sleep_for(boost::chrono::milliseconds(10));
|
||||
|
||||
CPack * pack = c->retrievePack();
|
||||
if(state == EClientState::DISCONNECTING)
|
||||
|
Reference in New Issue
Block a user