Thread View: comp.os.ms-windows.programmer.tools.owl
3 messages
3 total messages
Started by Jim
Tue, 22 Jul 2003 03:01
100 % CPU in Borland 3.1
Author: Jim
Date: Tue, 22 Jul 2003 03:01
Date: Tue, 22 Jul 2003 03:01
8 lines
1168 bytes
1168 bytes
Hello 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. regards and thanks Jim
Re: 100 % CPU in Borland 3.1
Author: Henrik Haftmann
Date: Thu, 24 Jul 2003 13:19
Date: Thu, 24 Jul 2003 13:19
12 lines
1833 bytes
1833 bytes
> 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
Re: 100 % CPU in Borland 3.1
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads