标签:eth pre ram eset reset time lap timers hand
/// <summary> /// 延迟调用 /// </summary> /// <param name="method"></param> /// <param name="delayTime"></param> public static void DelayInvoke(Action method, int delayTime = 2000) { System.Timers.Timer timer = new System.Timers.Timer(delayTime); timer.Elapsed += new System.Timers.ElapsedEventHandler((a, b) => { method(); }); //执行一次 false timer.AutoReset = false; //是否执行System.Timers.Timer.Elapsed事件 timer.Enabled = true; }
标签:eth pre ram eset reset time lap timers hand
原文地址:https://www.cnblogs.com/XuPengLB/p/9263374.html