delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/17/21:21:15

From: richard AT stardate DOT bc DOT ca (Richard Sanders)
To: djgpp AT delorie DOT com
Subject: Re: cpu eater
Date: Fri, 18 Dec 1998 01:57:18 GMT
Message-ID: <3679b55b.886652@mail.rapidnet.net>
References: <01be28e9$44e67ec0$affd22cb AT fountain> <36792993 DOT F93B6D04 AT monsterbymistake DOT com>
In-Reply-To: <36792993.F93B6D04@monsterbymistake.com>
X-Mailer: Forte Free Agent 1.11/32.235
Reply-To: djgpp AT delorie DOT com

On Thu, 17 Dec 1998 10:56:03 -0500, in comp.os.msdos.djgpp you wrote:

>I am wondering why it appears that the sleep function with
>the code compiled under DJGPP on the NT seems to use 100% of my CPU???

Perhaps because DJGPP is DOS and DOS is not multitasking sleep just
wastes time rather than giving the time back to the OS to be used by
other processes.

>I was expecting the program to sleep quietly for 5 secs and then
>continue
>the while();
>
>The same code is working fine on the UNIX machine.
>if this is NT being silly then how can I get around this?

No this is not NT being silly because sleep works as expected when
compiled with VC  and Borland 5.0



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019