Exemplo n.º 1
0
        public static void StartTimer(TimeSpan delay, TimeSpan interval, int count, Action callback, out TimerExecutionToken token)
        {
            DelayCallTimer t = DelayCallTimer.GetTimer(delay, interval, count, callback);

            t.Start();

#if DEBUG_TIMERS
            DelayCallTimer._stackTraces[t.GetHashCode()] = new StackTrace().ToString();
#endif
            token = new TimerExecutionToken(t);
        }
Exemplo n.º 2
0
 public static void StartTimer(TimeSpan interval, int count, Action callback, out TimerExecutionToken token) =>
 StartTimer(TimeSpan.Zero, interval, count, callback, out token);
Exemplo n.º 3
0
 public static void StartTimer(TimeSpan delay, TimeSpan interval, Action callback, out TimerExecutionToken token) =>
 StartTimer(delay, interval, 0, callback, out token);
Exemplo n.º 4
0
 public static void StartTimer(TimeSpan delay, Action callback, out TimerExecutionToken token) =>
 StartTimer(delay, TimeSpan.Zero, 1, callback, out token);