验证中...
Languages: C#
Categories: 编程语言基础
Latest update 2018-12-07 13:53
延时函数
Raw Copy
/// <summary>
/// 延时函数
/// </summary>
/// <param name="delayTime">需要延时多少秒</param>
/// <returns></returns>
public static bool Delay(int delayTime)
{
DateTime now = DateTime.Now;
int s;
do
{
TimeSpan spand = DateTime.Now - now;
s = spand.Seconds;
Application.DoEvents();
}
while (s < delayTime);
return true;
}

Comment list( 0 )

You need to Sign in for post a comment

Help Search