From 094f1c458f1fe0bb7896a1f1da7f73e9093b3c93 Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Fri, 14 Apr 2023 20:53:46 -0500 Subject: Only use c++ threads if they're supported by the compiler --- src/server/main.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/server/main.cpp b/src/server/main.cpp index 47a2c94..d27be67 100644 --- a/src/server/main.cpp +++ b/src/server/main.cpp @@ -127,7 +127,9 @@ int main (int argc, char *argv[]){ assert(lua_gettop(L) == 0); //printf("Gameloop\n"); //std::this_thread::yield(); +#ifdef this_thread std::this_thread::sleep_for(std::chrono::milliseconds(100)); +#endif //printf("Thread yeild\n"); assert(lua_gettop(L) == 0); pusherrorfunc(L);//errfunc() -- cgit v1.2.3-70-g09d2