Beispiel #1
0
 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);
 }
Beispiel #2
0
        public override bool Equals(object obj)
        {
            base.Equals(obj);
            TimerEventStruct es = (TimerEventStruct)obj;

            if (time == es.time)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #3
0
        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);
        }