在线程While中使用Thread.Sleep导致界面卡顿,替代方案:
public static void Delay(int mm) { DateTime current = DateTime.Now; while (current.AddMilliseconds(mm) > DateTime.Now) { Application.DoEvents(); } return; }
参考:https://blog.csdn.net/CatchMe_439/article/details/88548680
标签:C#,DateTime,current,mm,延时,Now From: https://www.cnblogs.com/Mars-0603/p/17706735.html