Creating Time Delay Programmatically C#
Wait a certain number of seconds before doing another action.
void LightWait(int waitTime) { int curSecond = Convert.ToInt32(DateTime.Now.ToString("ss")); int newSec = curSecond + waitTime; if (newSec > 59) { newSec = newSec - 60; } while (!(Convert.ToInt32(DateTime.Now.ToString("ss")) == newSec)) { Application.DoEvents(); } }
Note:
Paste this into your main form. (Not in any other void) To wait: LightWait(10); //this will wait for 10 seconds.
data visualization tool
ReplyDeleteSQIAR (http://www.sqiar.com/solutions/technology/tableau) is a leading Business Intelligence company.Sqiar Provide Services Like Tableau Software Which help the company to present Information in Meaningful form.