/// <summary> /// Adds scheduled action to list. /// </summary> /// <param name="action"></param> /// <param name="firstInMs"></param> /// <param name="regularInMs"></param> /// <returns></returns> public IDisposable ScheduleOnInterval(Action action, long firstInMs, long regularInMs) { var toAdd = new StubScheduledAction(action, firstInMs, regularInMs, _scheduled); _scheduled.Add(toAdd); return(toAdd); }
/// <summary> /// Adds a scheduled action to the list. /// </summary> /// <param name="action"></param> /// <param name="firstInMs"></param> /// <returns></returns> public IDisposable Schedule(Action action, long firstInMs) { var toAdd = new StubScheduledAction(action, firstInMs, _scheduled); _scheduled.Add(toAdd); return(toAdd); }