Pausing without using CPU power or blocking application
Posted on 2004-04-11
last question, then mi application is finished! ;-)
Is there a possibility to pause my application without using a lot of CPU power or blocking it from taking any new commands?
When I use "sleep()", my application is blocked and doesn't take any new commands.
procedure TForm1.pause(time1: longword);
var time2 : longword;
time2 := GetTickCount;
until (GetTickCount - time2 > time1);
CPU usage raises to 100% immediately. This is not very usefull, because I have a thread which is waiting for CPU usage to fall below a specific percentage...
Any other ideas? thanks