From 0c1684e1f2ab2f9cf79d8b19df7f4295e3d145c1 Mon Sep 17 00:00:00 2001 From: ccremers Date: Wed, 2 Aug 2006 09:27:09 +0000 Subject: [PATCH] - Windows-compatible (by disabling, duh..) --- src/timer.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/timer.c b/src/timer.c index 30b5615..81f941e 100644 --- a/src/timer.c +++ b/src/timer.c @@ -1,10 +1,12 @@ #include "timer.h" +#ifdef linux #include #include +static clock_t endwait = 0; +#endif static int time_max_seconds = 0; -static clock_t endwait = 0; //! Set initial time limit. /** @@ -16,12 +18,16 @@ set_time_limit (int seconds) if (seconds > 0) { time_max_seconds = seconds; +#ifdef linux endwait = seconds * CLK_TCK; +#endif } else { time_max_seconds = 0; +#ifdef linux endwait = 0; +#endif } } @@ -36,6 +42,7 @@ get_time_limit () int passed_time_limit () { +#ifdef linux if (endwait <= 0) { return 0; @@ -50,4 +57,7 @@ passed_time_limit () else return 0; } +#else + return 0; +#endif }