IScheduler.cs 707 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. namespace UniRx
  3. {
  4. public interface IScheduler
  5. {
  6. DateTimeOffset Now { get; }
  7. // Interface is changed from official Rx for avoid iOS AOT problem (state is dangerous).
  8. IDisposable Schedule(Action action);
  9. IDisposable Schedule(TimeSpan dueTime, Action action);
  10. }
  11. public interface ISchedulerPeriodic
  12. {
  13. IDisposable SchedulePeriodic(TimeSpan period, Action action);
  14. }
  15. public interface ISchedulerLongRunning
  16. {
  17. IDisposable ScheduleLongRunning(Action<ICancelable> action);
  18. }
  19. public interface ISchedulerQueueing
  20. {
  21. void ScheduleQueueing<T>(ICancelable cancel, T state, Action<T> action);
  22. }
  23. }