public bool IsOver(int id, int second, int overtime) { TimerMod md = TimeList.Find(c => c.Id == id); if (md == null) { md = new TimerMod() { Id = id }; TimeList.Add(md); } return(md.IsOverTime(second, overtime)); }
/// <summary> /// 检查是否达到超时条件 /// </summary> /// <param name="tag"></param> /// <param name="second"></param> /// <returns></returns> public bool IsOver(string tag, int second, int overtime) { TimerMod md = TimeList.Find(c => tag.Equals(c.Tag)); if (md == null) { md = new TimerMod() { Tag = tag }; TimeList.Add(md); } return(md.IsOverTime(second, overtime)); }