Example #1
0
 public IScheduledItem ScheduleOnce(Action <TimerState> timerUpdateEvent, long delayMs)
 {
     TimerEventScheduler.TimerEventSchedulerItem timerEventSchedulerItem = new TimerEventScheduler.TimerEventSchedulerItem(timerUpdateEvent)
     {
         delayMs = delayMs
     };
     this.Schedule(timerEventSchedulerItem);
     return(timerEventSchedulerItem);
 }
Example #2
0
 public IScheduledItem ScheduleUntil(Action <TimerState> timerUpdateEvent, long delayMs, long intervalMs, Func <bool> stopCondition)
 {
     TimerEventScheduler.TimerEventSchedulerItem timerEventSchedulerItem = new TimerEventScheduler.TimerEventSchedulerItem(timerUpdateEvent)
     {
         delayMs    = delayMs,
         intervalMs = intervalMs,
         timerUpdateStopCondition = stopCondition
     };
     this.Schedule(timerEventSchedulerItem);
     return(timerEventSchedulerItem);
 }
Example #3
0
 public IScheduledItem ScheduleForDuration(Action <TimerState> timerUpdateEvent, long delayMs, long intervalMs, long durationMs)
 {
     TimerEventScheduler.TimerEventSchedulerItem timerEventSchedulerItem = new TimerEventScheduler.TimerEventSchedulerItem(timerUpdateEvent)
     {
         delayMs    = delayMs,
         intervalMs = intervalMs,
         timerUpdateStopCondition = null
     };
     timerEventSchedulerItem.SetDuration(durationMs);
     this.Schedule(timerEventSchedulerItem);
     return(timerEventSchedulerItem);
 }