TimerFactory.cs 546 B

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