Adding delays: different ways : General Questions

Adding delays: different ways

Ask general questions here.

Adding delays: different ways

Postby LPG » Thu Sep 15, 2011 4:47 pm

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
LPG
 
Posts: 25
Joined: Mon Jul 25, 2011 7:12 pm

Re: Adding delays: different ways

Postby sdaly » Thu Sep 15, 2011 4:58 pm

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.
User avatar
sdaly
 
Posts: 213
Joined: Mon May 10, 2010 12:04 pm
Location: Dundee, Scotland

Re: Adding delays: different ways

Postby Support Team » Thu Sep 15, 2011 5:45 pm

Yes perfectly right.

Regards,
Markus
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4837
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to General Questions

Who is online

Users browsing this forum: No registered users and 0 guests