<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"><HTML><HEAD><META content=text/html;charset=iso-8859-1 http-equiv=Content-Type><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"><META content='"MSHTML 4.71.2016.0"' name=GENERATOR></HEAD><BODY bgColor=#ffffff><DIV><FONT color=#000000 face=Arial size=2>Hi all,</FONT></DIV><DIV><FONT color=#000000 face=Arial size=2></FONT> </DIV><DIV><FONT color=#000000 face=Arial size=2>Thanks for the help.</FONT></DIV><DIV><FONT color=#000000 face=Arial size=2></FONT> </DIV><DIV><FONT color=#000000 face=Arial size=2>This is what I got from your help and playing with VEE.</FONT></DIV><DIV><FONT color=#000000 face=Arial size=2></FONT> </DIV><DIV> </DIV><DIV><FONT color=#000000 face=Arial size=2></FONT><FONT color=#000000 face=Arial size=2></FONT> </DIV><DIV><FONT color=#000000 face=Arial size=2>1. If useing one thread programs the Win32 API sleep() seems to be the solution.</FONT></DIV><DIV><FONT color=#000000 face=Arial size=2></FONT> </DIV><DIV><FONT color=#000000 face=Arial size=2>2. If useing two or more threads VEE is showing weakness.</FONT></DIV><DIV><FONT color=#000000 face=Arial size=2> A two thread program where one theard is executing a DELAY </FONT></DIV><DIV><FONT color=#000000 face=Arial size=2></FONT><FONT face=Arial size=2> And the other theard is executing something, VEE still divides the resources equal between</FONT></DIV><DIV><FONT face=Arial size=2></FONT><FONT color=#000000 face=Arial size=2> the two threads. So now 50% of the resoures handed to VEE is doing nothing.</FONT></DIV><DIV><FONT color=#000000 face=Arial size=2></FONT> </DIV><DIV> </DIV><DIV><FONT color=#000000 face=Arial size=2></FONT> </DIV><DIV><FONT face=Arial size=2> Would the following be a solution.</FONT></DIV><DIV><FONT face=Arial size=2></FONT> <FONT color=#000000 face=Arial size=2> example</FONT></DIV><DIV><FONT color=#000000 face=Arial size=2>-------------------------------------------------------------------------------------------------------------------------------</FONT> </DIV><DIV><FONT face=Arial size=2> A 10 sec. DELAY is needed.</FONT></DIV><DIV><FONT face=Arial size=2> Divide the total delay into 50 mS VEE delay and 50 mS Win32 API sleep() .</FONT></DIV><DIV><FONT face=Arial size=2> Repeat this until you have the 10 sec.</FONT> </DIV><DIV><FONT face=Arial size=2></FONT><FONT color=#000000 face=Arial size=2> This would maintain VEE and transfer resources to OS and other programs.</FONT></DIV><DIV><FONT color=#000000 face=Arial size=2></FONT> </DIV><DIV><FONT color=#000000 face=Arial size=2></FONT><DIV><FONT face=Arial size=2> Adjusting the ratio between VEE delay and Win32 API sleep(), would control</FONT></DIV><DIV><FONT face=Arial size=2></FONT><FONT color=#000000 face=Arial size=2> the amount of resources transfered. </FONT></DIV><DIV><FONT color=#000000 face=Arial size=2></FONT> </DIV></DIV><DIV><FONT face=Arial size=2> As I see it in that 10 sec period, 50 % of the resources handed to VEE are handed back to OS.</FONT></DIV><DIV><FONT face=Arial size=2> 25 % doing DELAY and 25 % executing something. ( 75 % has the possibility of being produktive )</FONT> </DIV><DIV><FONT face=Arial size=2> Situations were OS has a alot to do like swap file, updating display and printing,</FONT> </DIV><DIV><FONT face=Arial size=2> the end result could be faster program executing. What do you think ? </FONT></DIV><DIV><FONT face=Arial size=2></FONT><FONT color=#000000 face=Arial size=2>--------------------------------------------------------------------------------------------------------------------------------</FONT></DIV><DIV><FONT face=Arial size=2> The perfect solution would be if VEE transfer resources from threads with DELAY and ON CYCLE to</FONT></DIV><DIV><FONT face=Arial size=2> threads with more productive object. </FONT> </DIV><DIV><FONT face=Arial size=2></FONT> </DIV><DIV><FONT face=Arial size=2></FONT> <FONT face=Arial size=2> By the way, Dialog box stops all threads. Is there a solution to this.</FONT></DIV><DIV><FONT face=Arial size=2></FONT> </DIV><DIV><FONT face=Arial size=2>Kjeld Alexander</FONT></DIV><DIV> <FONT color=#000000 face=Arial size=2><A href="mailto:k.alexander@worldonline.dk">k.alexander@worldonline.dk</A> </FONT></DIV><DIV> </DIV><DIV><FONT color=#000000 face=Arial size=2></FONT> </DIV><DIV> </DIV><DIV><FONT face=Arial size=2> </FONT></DIV><DIV><FONT color=#000000 face=Arial size=2></FONT> </DIV></BODY></HTML>