Cory Posted May 4, 2009 Report Share Posted May 4, 2009 The help file differentiates the timed delay as as sort of putting MEP in a sleep mode. I can understand that but I can't understand the intention or the possible applications. Can someone please explain to me where and when one should use timed delay mode? I will not go into it here but I recently discovered the mechanism of the two delays are different, can someone please describe to me how they differ? Quote Link to comment Share on other sites More sharing options...
kevin Posted May 4, 2009 Report Share Posted May 4, 2009 A normal delay uses a loop. Each iteration through the loop uses CPU cycles. The Wait for delay uses Windows to put the process to sleep for a specific amount of time. While asleep Macro Express uses no CPU cycles. You can terminate a macro in the middle of a normal Delay but you cannot terminate a macro in the middle of a Wait for delay. On a shared system such as Windows Terminal Services, Citrix, XenApp or virtual sessions such as Virtual PC or VMware these extra CPU cycles can affect other users of the same hardware. When that is the case we recommend using the Wait for delay instead of the normal Delay. Quote Link to comment Share on other sites More sharing options...
Cory Posted May 4, 2009 Author Report Share Posted May 4, 2009 Good explanation but I'm still a little confused. I had not mentioned the Wait for Time to Elapse but was rather speaking of the two options in the normal Delay command, timed and not timed. Are you suggesting that the Wait for Time to Elapse essentially the same thing as a timed Delay? I'll assume for the rest of this message it is. Next I performed a simple test and wanted confirmation of my findings. I created two macros, one with a loop that kept updating a text box every second and the other that had a simple timed delay. I started the first and then ran the second while it was still running and the first never missed a beat. You said "While asleep Macro Express uses no CPU cycles" and I think that needs additional qualification to isolate it to that macro. Is it safe to say "While asleep Macro Express uses no CPU cycles for that macro"? When choosing between the two is it simply a matter of weighing the additional load on the CPU versus the ability to halt? IE one should use the normal delay until the CPU load becomes a factor and then consider the timed delay. Is this essentially what it comes down to? Then again if we're talking about fractions of a second does one really care if one can't halt the macro. I feel like someone has given me access to a backhoe and a trencher and told me to dig a ditch. I know how each works but that still doesn't tell me which is the best to employ. Quote Link to comment Share on other sites More sharing options...
acantor Posted May 4, 2009 Report Share Posted May 4, 2009 A normal delay uses a loop. Each iteration through the loop uses CPU cycles. The Wait for delay uses Windows to put the process to sleep for a specific amount of time. While asleep Macro Express uses no CPU cycles. You can terminate a macro in the middle of a normal Delay but you cannot terminate a macro in the middle of a Wait for delay. On a shared system such as Windows Terminal Services, Citrix, XenApp or virtual sessions such as Virtual PC or VMware these extra CPU cycles can affect other users of the same hardware. When that is the case we recommend using the Wait for delay instead of the normal Delay. When using Macro Express in tandem with RAM intensive programs (say, Dragon NaturallySpeaking), is it preferable to use a "wait for delay" instead of a normal "delay?" Is there a threshold (say, 25 ms, 1000 ms, 3000 ms, etc.) beyond which one can notice performance penalties from using one wait command over the other? Quote Link to comment Share on other sites More sharing options...
kevin Posted May 4, 2009 Report Share Posted May 4, 2009 Is it safe to say "While asleep Macro Express uses no CPU cycles for that macro"? Yes. When choosing between the two is it simply a matter of weighing the additional load on the CPU versus the ability to halt? Yes. Quote Link to comment Share on other sites More sharing options...
kevin Posted May 4, 2009 Report Share Posted May 4, 2009 When using Macro Express in tandem with RAM intensive programs (say, Dragon NaturallySpeaking), is it preferable to use a "wait for delay" instead of a normal "delay?" Is there a threshold (say, 25 ms, 1000 ms, 3000 ms, etc.) beyond which one can notice performance penalties from using one wait command over the other? Each program and system are different. It is impossible for us to test every computer and program combination. We make no recommendations about when to use one or the other. It is up to you to try it. Quote Link to comment Share on other sites More sharing options...
Cory Posted May 4, 2009 Author Report Share Posted May 4, 2009 Thanks for the quick response. One final question: Does Wait for Time to Elapse use the same zero CPU method as timed Delay? IE is Wait for Time to Elapse essentially a longer period version of timed Delay? Quote Link to comment Share on other sites More sharing options...
kevin Posted May 4, 2009 Report Share Posted May 4, 2009 Thanks for the quick response. One final question: Does Wait for Time to Elapse use the same zero CPU method as timed Delay? IE is Wait for Time to Elapse essentially a longer period version of timed Delay? Wait for Time to Elapse and Delay: 0 milliseconds, without ability to halt work the same way. Quote Link to comment Share on other sites More sharing options...
acantor Posted May 4, 2009 Report Share Posted May 4, 2009 Wait for Time to Elapse and Delay: 0 milliseconds, without ability to halt work the same way. There is also the "Timed Delay in Seconds" and "Timed Delay in Milliseconds" commands, which apparently are easy on CPU and cannot be halted. Quote Link to comment Share on other sites More sharing options...
Cory Posted May 4, 2009 Author Report Share Posted May 4, 2009 There is also the "Timed Delay in Seconds" and "Timed Delay in Milliseconds" commands, which apparently are easy on CPU and cannot be halted.This is what I was asking about. Delay versus Timed Delay. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.