Article View: comp.os.ms-windows.programmer.tools.owl
Article #52Re: 100 % CPU in Borland 3.1
From: Jim
Date: Fri, 25 Jul 2003 04:48
Date: Fri, 25 Jul 2003 04:48
22 lines
1858 bytes
1858 bytes
Henrik Haftmann <henrik.haftmann@e-technik.tu-chemnitz.de> wrote in message news:<3F1FDCCF.5035@e-technik.tu-chemnitz.de>... > > We have an old Borland C++ 3.1 MDI application, > > when running it uses 100 % of the CPU while sitting > > waiting for user input. > > We have the source code and were wondering what we could do to > > make this application use less CPU. > Look for an "idle" function. It will be invoked from MessageLoop > when PeekMessage() returns FALSE. > idle() must return FALSE too, then MessageLoop invokes WaitMessage(), > and the CPU can sleep. > If you find an "idle" function always returning TRUE, you have the bug. > > henni sorry henni thats not useful old chap the IdleAction function returns a void you're thinking of a dialog based app, which this is not...this is an MDI as i stated :( cheers Bryce
Technical Details
Message-ID:
<59e77fdf.0307242048.3abc02e4@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailReferences:
<59e77fdf.0307211901.420fdec7@posting.google.com> <3F1FDCCF.5035@e-technik.tu-chemnitz.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fe201,8e3bc4c530713df8 X-Google-Attributes: gidfe201,public X-Google-Thread: 108ebe,8e3bc4c530713df8 X-Google-Attributes: gid108ebe,public X-Google-ArrivalTime: 2003-07-24 21:48:38 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: jimmybubblewrap@yahoo.com.au (Jim) Newsgroups: comp.os.ms-windows.programmer.tools.owl,borland.public.cpp.owl Subject: Re: 100 % CPU in Borland 3.1 Date: 24 Jul 2003 21:48:26 -0700 Organization: http://groups.google.com/ Lines: 22 Message-ID: <59e77fdf.0307242048.3abc02e4@posting.google.com> References: <59e77fdf.0307211901.420fdec7@posting.google.com> <3F1FDCCF.5035@e-technik.tu-chemnitz.de> NNTP-Posting-Host: 63.60.243.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1059108511 28945 127.0.0.1 (25 Jul 2003 04:48:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 25 Jul 2003 04:48:31 GMT