mirror of https://github.com/odrling/Aegisub
Use std::thread with libc++
boost::thread is only used due to libstdc++ 4.8 missing a bunch of stuff.
This commit is contained in:
parent
6477ef933b
commit
50f2e550e2
|
@ -12,7 +12,13 @@
|
|||
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#ifdef _LIBCPP_VERSION
|
||||
#include <thread>
|
||||
#else
|
||||
#include <boost/thread.hpp>
|
||||
#endif
|
||||
|
||||
namespace agi { namespace util {
|
||||
|
||||
|
@ -25,7 +31,11 @@ timeval time_log() {
|
|||
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 New Issue