mirror of https://github.com/axmolengine/axmol.git
issue #2305: Sleep(50) on Win32, usleep(50000) on unix --> std::this_thread::sleep_for(std::chrono::milliseconds(50));
This commit is contained in:
parent
ea36707c57
commit
ae737365d7
|
@ -391,11 +391,8 @@ int WebSocket::onSubThreadLoop()
|
|||
}
|
||||
|
||||
// Sleep 50 ms
|
||||
#ifdef WIN32
|
||||
Sleep(50);
|
||||
#else
|
||||
usleep(50000);
|
||||
#endif
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
|
||||
// return 0 to continue the loop.
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue