|
Pause the current thread for a few seconds, and the system executes other threads
Delay (3);
#region delay (in seconds)
public void Delay (int delayTime)
{
DateTime now = DateTime.Now;
int s;
do
{
TimeSpan spand = DateTime.Now-now;
s = spand.Seconds;
Application.DoEvents ();
}
while (s <delayTime);
}
#endregion |
|