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

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

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