From 8857dafa2f91d6aa1b8850d9c6f3697467a9e4e9 Mon Sep 17 00:00:00 2001 From: stpohle Date: Mon, 19 May 2003 21:55:55 +0000 Subject: [PATCH] patch for windows to get the cpu usage down.. i hope this s_delay (int ms) function works now --- src/sysfunc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sysfunc.c b/src/sysfunc.c index eb1c6a4..7032b1f 100644 --- a/src/sysfunc.c +++ b/src/sysfunc.c @@ -1,4 +1,4 @@ -/* $Id: sysfunc.c,v 1.13 2003/05/08 00:08:18 stpohle Exp $ +/* $Id: sysfunc.c,v 1.14 2003/05/19 21:55:55 stpohle Exp $ sysfunc.c - this file hold some routines for the system functions.. like d_delay */ @@ -12,6 +12,10 @@ void s_delay (int ms) { +#ifdef _WIN32 + sleep (ms); /* i hope this works on windows.. on MSVC it + should but with MINGW i don't know yet */ +#else fd_set selectset; struct timeval tval; @@ -19,6 +23,7 @@ s_delay (int ms) tval.tv_sec = 0; tval.tv_usec = ms * 1000; select (1, &selectset, NULL, NULL, &tval); +#endif };