diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-01-29 21:42:53 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-01-30 13:49:50 -0500 |
| commit | b1c9984498db115bae5e32e3e1c018fb7cb340a9 (patch) | |
| tree | 05fe34c62c88c882dd55801f316d42bce9fef5e8 /MediaBrowser.Server.Implementations | |
| parent | b82b6fc97554009c045f2f2f0ffa10cf806bc71b (diff) | |
update timer
Diffstat (limited to 'MediaBrowser.Server.Implementations')
| -rw-r--r-- | MediaBrowser.Server.Implementations/EntryPoints/LoadRegistrations.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/LoadRegistrations.cs b/MediaBrowser.Server.Implementations/EntryPoints/LoadRegistrations.cs index 701cf21fb..efda36821 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/LoadRegistrations.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/LoadRegistrations.cs @@ -4,6 +4,7 @@ using MediaBrowser.Model.Logging; using System; using System.Threading; using System.Threading.Tasks; +using MediaBrowser.Common.Threading; namespace MediaBrowser.Server.Implementations.EntryPoints { @@ -22,7 +23,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints /// </summary> private readonly ILogger _logger; - private Timer _timer; + private PeriodicTimer _timer; /// <summary> /// Initializes a new instance of the <see cref="LoadRegistrations" /> class. @@ -41,7 +42,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints /// </summary> public void Run() { - _timer = new Timer(s => LoadAllRegistrations(), null, TimeSpan.FromMilliseconds(100), TimeSpan.FromHours(12)); + _timer = new PeriodicTimer(s => LoadAllRegistrations(), null, TimeSpan.FromMilliseconds(100), TimeSpan.FromHours(12)); } private async Task LoadAllRegistrations() |
