diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2009-09-30 18:48:40 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2009-09-30 18:48:40 (GMT) |
commit | cc8c4a3f4fdc92a40d0ae5def0a113f860d11a8f (patch) | |
tree | d9aee682360790f7ecae617d53be3615c950e707 /Tests/CTestTestTimeout | |
parent | 122c7f61795fbe4d12d44c4faf0e0536058178c8 (diff) | |
download | CMake-cc8c4a3f4fdc92a40d0ae5def0a113f860d11a8f.zip CMake-cc8c4a3f4fdc92a40d0ae5def0a113f860d11a8f.tar.gz CMake-cc8c4a3f4fdc92a40d0ae5def0a113f860d11a8f.tar.bz2 |
Improved safety and removed busy waiting from the CTestTestTimeout test.
Diffstat (limited to 'Tests/CTestTestTimeout')
-rw-r--r-- | Tests/CTestTestTimeout/timeout.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Tests/CTestTestTimeout/timeout.c b/Tests/CTestTestTimeout/timeout.c index e30cf5a..559b6a5 100644 --- a/Tests/CTestTestTimeout/timeout.c +++ b/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) { - while(1) - { - } - return 0; +#if defined(_WIN32) + Sleep(5000); +#else + sleep(5); +#endif + return -1; } |