public static Timer DelayCall(TimeSpan delay, TimeSpan interval, int count, TimerCallback callback) { Timer t = new DelayCallTimer(delay, interval, count, callback); t.Start(); return(t); }
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); }
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 }
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); }
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); }
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); }
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; }