|
-
May 24th, 2002, 08:39 AM
#1
How can i scale processing time for applications?
Hello,
maybe someone can help me with this problem:
I have a C++ application, which takes 99 per cent CPU time when activated. The problem is that other applications used for the user interface (button control, etc) have a very long response time (1 to 3 seconds) because of that. All tasks have the same priority (Win NT).
My idea was using a timer to evaluate processing time in 100ms and then use that information to scale processing time with the sleep() function to 80 per cent. Well, that certainly works for one instance, but not if two instances of this application are running at the same time, which happens to be the case sometimes.
If anyone has a good idea to resolve this problem, that would be very helpful and highly appreciated.
Regards
Kinzer
-
May 24th, 2002, 08:54 AM
#2
Maybe you could put a value in the registry that works as a counter of the instances of your app and then divide the time equally between all instances?
regards,
MiMec
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|