issue #2305: Sleep(50) on Win32, usleep(50000) on unix --> std::this_thread::sleep_for(std::chrono::milliseconds(50));

This commit is contained in:
James Chen 2013-06-26 11:34:04 +08:00
parent ea36707c57
commit ae737365d7
1 changed files with 2 additions and 5 deletions

View File

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