Hi ,
If I make a while , repeat or for loop (it's the same) and count until 1000 inside it - to complete counting it takes around 65 ms to be done and it takes all of CPU utilization (off course it does).
If I put application.processmessages it takes around 340 ms to be done , but it also takes all of CPU utilization (again, of course it does).
IF I add sleep(10); or less then 10 ms it takes 15 600ms to be done, but no CPU utilization is taken (of course it doesn't) - this is what I need - form refresh with application.processmessages and no CPU utilization with sleep() .
So what is the question ?
Well ,
10 ms * 1000 = 10 000 ms + 340 ms = 10 340 ms which is less then 15 600 ms
1 ms * 1000 = 1000 ms + 340 ms = 1 340 ms which is , also less then 15 600 ms
How to avoid this kind of problem and reduce time difference, inside of an loop , not using a thread ?
Thx