TimerFactory.cs 632 B

123456789101112131415161718192021
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using MediaBrowser.Model.Threading;
  6. namespace Emby.Common.Implementations.Threading
  7. {
  8. public class TimerFactory : ITimerFactory
  9. {
  10. public ITimer Create(Action<object> callback, object state, TimeSpan dueTime, TimeSpan period)
  11. {
  12. return new CommonTimer(callback, state, dueTime, period);
  13. }
  14. public ITimer Create(Action<object> callback, object state, int dueTimeMs, int periodMs)
  15. {
  16. return new CommonTimer(callback, state, dueTimeMs, periodMs);
  17. }
  18. }
  19. }