diff --git a/src/generic/evas/common/timeout.c b/src/generic/evas/common/timeout.c index 6d52aa9609..7737bad41f 100644 --- a/src/generic/evas/common/timeout.c +++ b/src/generic/evas/common/timeout.c @@ -1,5 +1,27 @@ -#include -#include +#ifdef _WIN32 +# include +# include +# include + +unsigned int +_timeout(void *arg) +{ + int s (int)arg; + Sleep(s * 1000); + _Exit(-1); + _endthreadex(0); + return 0; +} + +void +timeout_init(int seconds) +{ + unsigned int id; + _beginthreadex( NULL, 0, _timeout, (void *)seconds, 0, &id); +} +#else +# include +# include static void _timeout(int val) @@ -14,3 +36,4 @@ timeout_init(int seconds) signal(SIGALRM, _timeout); alarm(seconds); } +#endif