diff options
| author | Claus Vium <clausvium@gmail.com> | 2019-02-05 09:49:46 +0100 |
|---|---|---|
| committer | Bond-009 <bond.009@outlook.com> | 2019-02-05 16:47:50 +0100 |
| commit | 0ef2b46106937c8acbab8e2a6a1e08affb823d31 (patch) | |
| tree | d677d8611a00fb1c7ebe6749b8aaf5e209fa2522 /MediaBrowser.Api/Playback/TranscodingThrottler.cs | |
| parent | 52294881b190ad0c4566f46988c5521f6fefabc1 (diff) | |
Remove custom Threading
Diffstat (limited to 'MediaBrowser.Api/Playback/TranscodingThrottler.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/TranscodingThrottler.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/MediaBrowser.Api/Playback/TranscodingThrottler.cs b/MediaBrowser.Api/Playback/TranscodingThrottler.cs index 9f416098a..0e73d77ef 100644 --- a/MediaBrowser.Api/Playback/TranscodingThrottler.cs +++ b/MediaBrowser.Api/Playback/TranscodingThrottler.cs @@ -1,9 +1,9 @@ using System; +using System.Threading; using System.Threading.Tasks; using MediaBrowser.Common.Configuration; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.IO; -using MediaBrowser.Model.Threading; using Microsoft.Extensions.Logging; namespace MediaBrowser.Api.Playback @@ -12,18 +12,16 @@ namespace MediaBrowser.Api.Playback { private readonly TranscodingJob _job; private readonly ILogger _logger; - private ITimer _timer; + private Timer _timer; private bool _isPaused; private readonly IConfigurationManager _config; - private readonly ITimerFactory _timerFactory; private readonly IFileSystem _fileSystem; - public TranscodingThrottler(TranscodingJob job, ILogger logger, IConfigurationManager config, ITimerFactory timerFactory, IFileSystem fileSystem) + public TranscodingThrottler(TranscodingJob job, ILogger logger, IConfigurationManager config, IFileSystem fileSystem) { _job = job; _logger = logger; _config = config; - _timerFactory = timerFactory; _fileSystem = fileSystem; } @@ -34,7 +32,7 @@ namespace MediaBrowser.Api.Playback public void Start() { - _timer = _timerFactory.Create(TimerCallback, null, 5000, 5000); + _timer = new Timer(TimerCallback, null, 5000, 5000); } private async void TimerCallback(object state) |
