public void SetTimer(TimeSpan after, TimerEvent te) { TimerEventStruct evs = new TimerEventStruct(); evs.time = after + elapsedTotal; evs.ev += te; for (int i = 0; i < events.Count; i++) if (events[i].time == (after + elapsedTotal)) { events[i].ev += te; return; } events.Add(evs); }
public override bool Equals(object obj) { base.Equals(obj); TimerEventStruct es = (TimerEventStruct)obj; if (time == es.time) { return(true); } else { return(false); } }
public void SetTimer(TimeSpan after, TimerEvent te) { TimerEventStruct evs = new TimerEventStruct(); evs.time = after + elapsedTotal; evs.ev += te; for (int i = 0; i < events.Count; i++) { if (events[i].time == (after + elapsedTotal)) { events[i].ev += te; return; } } events.Add(evs); }