jaredc071598
asked on
Time Critical Apps
I am looking for a way to force windows to check an application within a certain period.
This does not need to be particularly fast, say every 20milliseconds, but it must occur every 20ms. I don't want other programs to come along and take over processor time such that it turns into 30ms or anything like that
any ideas... I am fairly new at Delphi but want to investigate this
This does not need to be particularly fast, say every 20milliseconds, but it must occur every 20ms. I don't want other programs to come along and take over processor time such that it turns into 30ms or anything like that
any ideas... I am fairly new at Delphi but want to investigate this
Yes, and SetThreadPriority(GetCurre ntThread,. ..).
Madshi, you are right.
The priority of the thread is the combination of the thread priority and the process priority. Note that it is a relative number so if somebody has a higher number you are still not garanteed to receive focus every 20ms.
Usually I search for other solutions. Priorities are dirty. If you need it to access hardware, see if there is a buffer. That is much more useful
The priority of the thread is the combination of the thread priority and the process priority. Note that it is a relative number so if somebody has a higher number you are still not garanteed to receive focus every 20ms.
Usually I search for other solutions. Priorities are dirty. If you need it to access hardware, see if there is a buffer. That is much more useful
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Take a look at the API below.
BOOL SetPriorityClass( HANDLE hProcess, // handle to the process
DWORD dwPriorityClass // priority class value);