1 public static void Delay(int mm) 2 { 3 while (DateTime.Now.AddMilliseconds((double)mm) > DateTime.Now) 4 { 5 Thread.Sleep(100);这里设置1到100都可以 6 Application.DoEvents(); 7 } 8 } 9 10 this.Delay(2000000000);这里在函数类进行调用即可
2022-06-01 06:30:39
1 public static void Delay(int mm) 2 { 3 while (DateTime.Now.AddMilliseconds((double)mm) > DateTime.Now) 4 { 5 Thread.Sleep(100);这里设置1到100都可以 6 Application.DoEvents(); 7 } 8 } 9 10 this.Delay(2000000000);这里在函数类进行调用即可
下一篇:C# - Task