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

            t._returnOnDetach = true;
            t.Start();

#if DEBUG_TIMERS
            DelayCallTimer._stackTraces[t.GetHashCode()] = new StackTrace().ToString();
#endif
        }
Esempio n. 2
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);
        }