예제 #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);
        }
예제 #2
0
 public static void StartTimer(TimeSpan interval, int count, Action callback, out TimerExecutionToken token) =>
 StartTimer(TimeSpan.Zero, interval, count, callback, out token);
예제 #3
0
 public static void StartTimer(TimeSpan delay, TimeSpan interval, Action callback, out TimerExecutionToken token) =>
 StartTimer(delay, interval, 0, callback, out token);
예제 #4
0
 public static void StartTimer(TimeSpan delay, Action callback, out TimerExecutionToken token) =>
 StartTimer(delay, TimeSpan.Zero, 1, callback, out token);