From cc8c4a3f4fdc92a40d0ae5def0a113f860d11a8f Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Wed, 30 Sep 2009 14:48:40 -0400 Subject: Improved safety and removed busy waiting from the CTestTestTimeout test. --- Tests/CTestTestTimeout/timeout.c | 17 +++++++++++------ 1 file 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 +#if defined(_WIN32) +# include +#else +# include +#endif -/* infinite loop */ int main(void) { - while(1) - { - } - return 0; +#if defined(_WIN32) + Sleep(5000); +#else + sleep(5); +#endif + return -1; } -- cgit v0.12