C#延时函数,能延时小数ms的函数
引用:
using System.Threading.Tasks; using System.Windows.Forms;
public void DoDelay(double milliSecond)//延时函数 { int start = Environment.TickCount; while (Environment.TickCount < (start + milliSecond)) { if (Environment.TickCount < start) return; Application.DoEvents(); } }