Esempio n. 1
0
        public SimplerTimer CallPeriodically(int delayMillis, Action callback)
        {
            var timer = new SimplerTimer(0, delayMillis, callback);

            timer.Start();
            AddTimer(timer);
            return(timer);
        }
Esempio n. 2
0
        public SimplerTimer CallDelayed(int delayMillis, Action callback)
        {
            var timer = new SimplerTimer(delayMillis, 0, callback);

            timer.Start();
            AddTimer(timer);
            return(timer);
        }
Esempio n. 3
0
 public bool Equals(SimplerTimer obj)
 {
     // needs to be improved
     return(obj.m_intervalMillis == m_intervalMillis && Equals(obj.m_action, m_action));
 }
Esempio n. 4
0
 public void RemoveTimer(SimplerTimer timer)
 {
     AddMessage(() => m_timers.Remove(timer));
 }
Esempio n. 5
0
 public void AddTimer(SimplerTimer timer)
 {
     AddMessage(() => m_timers.Add(timer));
 }