Explorar el Código

Improved safety and removed busy waiting from the CTestTestTimeout test.

Zach Mullen hace 16 años
padre
commit
cc8c4a3f4f
Se han modificado 1 ficheros con 11 adiciones y 6 borrados
  1. 11 6
      Tests/CTestTestTimeout/timeout.c

+ 11 - 6
Tests/CTestTestTimeout/timeout.c

@@ -1,10 +1,15 @@
-#include <stdio.h>
+#if defined(_WIN32)
+# include <windows.h>
+#else
+# include <unistd.h>
+#endif
 
 
-/* infinite loop */
 int main(void)
 int main(void)
 {
 {
-  while(1)
-    {
-    }
-  return 0;
+#if defined(_WIN32)
+  Sleep(5000);
+#else
+  sleep(5);
+#endif
+  return -1;
 }
 }