/// <summary>
/// 延時方法
/// </summary>
/// <param name="milliSecond"></param>
public void Delay(int milliSecond)
{
int start = Environment.TickCount;//獲取系統的毫秒數
while (Math.Abs(Environment.TickCount - start) < milliSecond)//毫秒
{
//Application.DoEvents();//可执行某无聊的操作
}
}
来源:CSDN
作者:lee_u
链接:https://blog.csdn.net/lee_u/article/details/104803210