Exemplo n.º 1
0
 /// <summary>
 ///     Stop tracking a timer, and kill it
 /// </summary>
 /// <param name="t">The timer to forget and kill</param>
 public void RemoveTimer(ref WrappedTimer t)
 {
     lock (timerList)
     {
         if (timerList.Contains(t))
         {
             timerList.Remove(t);
         }
     }
     t.Dispose();
     t = null;
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Stop tracking a timer, and kill it
 /// </summary>
 /// <param name="t">The timer to forget and kill</param>
 public void RemoveTimer(ref WrappedTimer t)
 {
     lock ( heardof )
     {
         if (heardof.Contains(t))
         {
             heardof.Remove(t);
         }
     }
     t.Dispose();
     t = null;
 }