I would like to add a delay between the two lines of code because I am testing the updateprogress template. Ideally single line.
Thank.
Try Sleep . Example:
Thread.Sleep(3000); //3 seconds
You will need to add this using the directive:
using System.Threading;
to access the method.
The parameter you pass is the number of milliseconds you want to pause the current thread.
Are you looking for Thread.Sleep (2000)?
Thread.Sleep :
#if DEBUG Thread.Sleep(1000); #endif
, Thread.Sleep.
Thread.Sleep
Thread.Sleep(10000);//Waits 10 seconds.
Thread.Sleep()
You can put this line in a condition that will only be "true" by passing this amount of time using the delay method: Thread.Sleep (time)
System.Threading.Thread.Sleep(int time_ms); //One line, no 'using' :)
Source: https://habr.com/ru/post/1791020/More articles:prevent opening page on iframe? - phpAWS SES for Email: Email Verification Required? - amazon-web-servicesUsing a combination of two fields as a key in a dictionary - dictionaryHow can I format (fairly print) a multidimensional array for debugging? - pretty-printWhat is the advantage of RTSP over plain HTTP for static files? - language-agnosticDatastore for user data - design Q - database-designFacebook kiosk like feature - facebookAdding a runtime-library configuration for flexible builds using the ant mxmlc task - flexC # Simulate a non-responding TCP port - c #javascript - sort list item up or down - javascriptAll Articles