Example #1
0
        public static Timer DelayCall(TimeSpan delay, TimeSpan interval, int count, TimerCallback callback)
        {
            Timer t = new DelayCallTimer(delay, interval, count, callback);

            t.Start();

            return(t);
        }
Example #2
0
        public static Timer DelayCall(TimeSpan delay, TimeSpan interval, int count, TimerCallback callback)
        {
            Timer t = new DelayCallTimer(delay, interval, count, callback);

            t.Priority = ComputePriority(count == 1 ? delay : interval);
            t.Start();

            return(t);
        }
Example #3
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
        }
Example #4
0
        public static DelayCallTimer DelayCall(TimeSpan delay, TimeSpan interval, int count, Action callback)
        {
            DelayCallTimer t = new DelayCallTimer(delay, interval, count, callback);

            t.Start();
#if DEBUG_TIMERS
            t._allowFinalization = true;
#endif

            return(t);
        }
Example #5
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);
        }
Example #6
0
 public static Server.Timer DelayCall(TimeSpan delay, TimeSpan interval, int count, Server.TimerCallback callback)
 {
     Server.Timer timer1 = new DelayCallTimer(delay, interval, count, callback);
     if (count == 1)
     {
         timer1.Priority = Server.Timer.ComputePriority(delay);
     }
     else
     {
         timer1.Priority = Server.Timer.ComputePriority(interval);
     }
     timer1.Start();
     return(timer1);
 }
Example #7
0
		public static Timer DelayCall( TimeSpan delay, TimeSpan interval, int count, TimerCallback callback )
		{
			Timer t = new DelayCallTimer( delay, interval, count, callback );

			if ( count == 1 )
				t.Priority = ComputePriority( delay );
			else
				t.Priority = ComputePriority( interval );

			t.Start();

			return t;
		}