Exemplo n.º 1
0
 protected virtual FlexTimer SetupTimer(FlexTimer timer)
 {
     timer.EnableConcurrency = EnableConcurrency;
     if (UseSynchronizationContext)
     {
         timer.SetSynchronizationContext(PredefinedSynchronizationContext ?? SynchronizationContext.Current);
     }
     return timer;
 }
Exemplo n.º 2
0
 public void CreateAndStartTimers()
 {
     JailbreakTimer  = new FlexTimer(JailbreakTimerFinished, JailbreakTimerTicked, null, JailbreakTime, 60000);
     CoordCheckTimer = new FlexTimer(CoordTimerFinished, CoordTimerTicked, null, 0, CoordCheckTime, true);
 }
Exemplo n.º 3
0
 public FlexTimer StartNew(Action<object> action, object state, TimeSpan interval, TimeSpan dueTime)
 {
     var timer = new FlexTimer(action, state, interval);
     SetupTimer(timer).Start(dueTime);
     return timer;
 }
Exemplo n.º 4
0
 public FlexTimer StartNew(Action<object> action, object state, int intervalMilliseconds, int dueTimeMilliseconds)
 {
     var timer = new FlexTimer(action, state, intervalMilliseconds);
     SetupTimer(timer).Start(dueTimeMilliseconds);
     return timer;
 }
Exemplo n.º 5
0
 public FlexTimer StartNew(Action action, TimeSpan interval, TimeSpan dueTime)
 {
     var timer = new FlexTimer(action, interval);
     SetupTimer(timer).Start(dueTime);
     return timer;
 }
Exemplo n.º 6
0
 public FlexTimer StartNew(Action action, int intervalMilliseconds)
 {
     var timer = new FlexTimer(action, intervalMilliseconds);
     SetupTimer(timer).Start();
     return timer;
 }
Exemplo n.º 7
0
 protected override FlexTimer SetupTimer(FlexTimer timer)
 {
     base.SetupTimer(timer);
     timer.SetMissedCallHandler(MissedCallHandler);
     timer.SetErrorHandler(ErrorHandler);
     return timer;
 }
Exemplo n.º 8
0
 public FlexTimer StartNew(TimeSpan interval, object state, TimeSpan dueTime, Func<object, Task> func)
 {
     var timer = new FlexTimer(interval, state, func);
     SetupTimer(timer).Start(dueTime);
     return timer;
 }
Exemplo n.º 9
0
 public FlexTimer StartNew(int intervalMilliseconds, object state, int dueTimeMilliseconds,
     Func<object, Task> func)
 {
     var timer = new FlexTimer(intervalMilliseconds, state, func);
     SetupTimer(timer).Start(dueTimeMilliseconds);
     return timer;
 }
Exemplo n.º 10
0
 public FlexTimer StartNew(TimeSpan interval, Func<Task> func)
 {
     var timer = new FlexTimer(interval, func);
     SetupTimer(timer).Start();
     return timer;
 }
Exemplo n.º 11
0
 public FlexTimer StartNew(int intervalMilliseconds, Func<Task> func)
 {
     var timer = new FlexTimer(intervalMilliseconds, func);
     SetupTimer(timer).Start();
     return timer;
 }