Page 1 of 1

Adding delays: different ways

Posted: Thu Sep 15, 2011 3:47 pm
by LPG
What is the difference between the following 2 ways of adding a delay?

1. In code: System.Threading.Thread.Sleep(5000);
2. In the recording: Add New Action > Delay.

Thanks

Re: Adding delays: different ways

Posted: Thu Sep 15, 2011 3:58 pm
by sdaly
I *think* Ranorex.Delay calls Thread.Sleep so it is the same thing....only difference is you can specify seconds, minutes etc and Ranorex will scale it before passing to Thread.Sleep and it will output in the progress form.

I usually use Ranorex.Delay if I want users to know a delay is occurring and I use Thread.Sleep when in a loop but I want the last message shown on the progress form to still be show.

Re: Adding delays: different ways

Posted: Thu Sep 15, 2011 4:45 pm
by Support Team
Yes perfectly right.

Regards,
Markus
Ranorex Support Team