CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Posts
    2

    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

  2. #2
    Join Date
    May 2002
    Location
    Poland
    Posts
    48
    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
  •  





Click Here to Expand Forum to Full Width

Featured