Use std::this_thread everywhere
The previous logic wouldn't compile on linux using clang. With the meson build requiring c++14, there's no need for platform specific code. Really, the entire agi::util::sleep_for function could be removed entirely, but I'll keep the patch minimal for now.
This commit is contained in:
parent
86354050f3
commit
1772dd17ae
1 changed files with 0 additions and 9 deletions
|
@ -15,22 +15,13 @@
|
|||
#include <libaegisub/util.h>
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#ifdef _LIBCPP_VERSION
|
||||
#include <thread>
|
||||
#else
|
||||
#include <boost/thread.hpp>
|
||||
#endif
|
||||
|
||||
namespace agi { namespace util {
|
||||
void SetThreadName(const char *) { }
|
||||
|
||||
void sleep_for(int ms) {
|
||||
#ifdef __clang__
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(ms));
|
||||
#else
|
||||
boost::this_thread::sleep_for(boost::chrono::milliseconds(ms));
|
||||
#endif
|
||||
}
|
||||
|
||||
} }
|
||||
|
|
Loading…
Reference in a new issue