aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs')
-rw-r--r--MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs b/MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs
index ba335868d..20d4c6b2a 100644
--- a/MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs
+++ b/MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs
@@ -4,7 +4,7 @@ using MediaBrowser.Controller.Session;
using MediaBrowser.Model.Logging;
using System;
using System.Linq;
-using System.Threading;
+using MediaBrowser.Common.Threading;
namespace MediaBrowser.Server.Startup.Common.EntryPoints
{
@@ -12,7 +12,7 @@ namespace MediaBrowser.Server.Startup.Common.EntryPoints
{
private readonly ISessionManager _sessionManager;
private readonly ILogger _logger;
- private Timer _timer;
+ private PeriodicTimer _timer;
private readonly IServerApplicationHost _appHost;
public KeepServerAwake(ISessionManager sessionManager, ILogger logger, IServerApplicationHost appHost)
@@ -24,7 +24,7 @@ namespace MediaBrowser.Server.Startup.Common.EntryPoints
public void Run()
{
- _timer = new Timer(obj =>
+ _timer = new PeriodicTimer(obj =>
{
var now = DateTime.UtcNow;
if (_sessionManager.Sessions.Any(i => (now - i.LastActivityDate).TotalMinutes < 15))