diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 82a1e39761..d3b8cca9c0 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +2000-11-21 13:40 UTC-0400 David G. Holm + * source/rtl/idle.c + + Added Sleep(0) for 32bit Windows mode to forfeit the + remainder of the current time slice in hb_releaseCPU(). + 2000-11-21 08:55 UTC+0800 Ron Pinkas * source/pp/ppcomp.c * source/compiler/harbour.c diff --git a/harbour/source/rtl/idle.c b/harbour/source/rtl/idle.c index 05e6653070..d713516bba 100644 --- a/harbour/source/rtl/idle.c +++ b/harbour/source/rtl/idle.c @@ -47,6 +47,7 @@ /* NOTE: For OS/2. Must be ahead of any and all #include statements */ #define INCL_DOSPROCESS #define INCL_NOPMAPI +#define HB_OS_WIN_32_USED #include "hbapi.h" #include "hbapiitm.h" @@ -69,7 +70,8 @@ static void hb_releaseCPU( void ) /* TODO: Add code to release time slices on all platforms */ #if defined(HB_OS_WIN_32) - /* according to ms docs, you should not do this in a Win app. dos only */ + /* Forfeit the remainder of the current time slice. */ + Sleep( 0 ); #elif defined(HB_OS_OS2) DosSleep( 25 ); /* Duration is in milliseconds */ #elif defined(HB_OS_DOS)