[flang-commits] [flang] [flang][runtime] Implement SLEEP intrinsic (PR #79074)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Wed Jan 24 09:15:23 PST 2024


================
@@ -39,8 +40,10 @@ inline void CtimeBuffer(char *buffer, size_t bufsize, const time_t cur_time,
 #endif
 
 #if _REENTRANT || _POSIX_C_SOURCE >= 199506L
-// System is posix-compliant and has getlogin_r
+// System is posix-compliant and has getlogin_r and sleep
 #include <unistd.h>
+#elif _WIN32
+#include <windows.h> // for sleep
----------------
tblah wrote:

I've updated to use std::this_thread::sleep_for for windows compatiability. Fingers crossed I didn't just add a dependency on libc++ on some obscure target.

https://github.com/llvm/llvm-project/pull/79074


More information about the flang-commits mailing list