aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-01-29 14:20:09 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-01-30 13:49:12 -0500
commit00de5b1ca7c921bf84b9ba2a51bcf40e4bdafe15 (patch)
tree98a5822f107f9a1f747fe470af7afd1f585900a1 /MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs
parent0361b8b0e8023c400df3eaac04718cf9b8ff01d0 (diff)
update use of timers
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))