/// <summary> /// /// </summary> /// <param name="name"></param> /// <param name="callType"></param> /// <param name="delay">延时</param> /// <param name="callback"></param> public static void Add(string name, TimerCallType callType, int delay, Action <TimerCallItem> callback) { TimerCallItem item = new TimerCallItem { Name = name, CallType = callType, Timestamp = DateTime.Now, Delay = delay, Callback = callback }; Add(item); }
/// <summary> /// /// </summary> /// <param name="name"></param> /// <param name="callType"></param> /// <param name="delay">延时</param> /// <param name="callback"></param> public static void Add(string name, TimerCallType callType, int delay, Action<TimerCallItem> callback) { TimerCallItem item = new TimerCallItem { Name = name, CallType = callType, Timestamp = DateTime.Now, Delay = delay, Callback = callback }; Add(item); }