BirthdayBot/BackgroundServices/Heartbeat.cs
Noi f1e7bd8c67 Removed disconnected server count
Made redundant by per-shard status on every birthday update
2020-07-27 22:40:09 -07:00

20 lines
553 B
C#

using System;
using System.Threading.Tasks;
namespace BirthdayBot.BackgroundServices
{
/// <summary>
/// Basic heartbeat function - hints that the background task is still alive.
/// </summary>
class Heartbeat : BackgroundService
{
public Heartbeat(BirthdayBot instance) : base(instance) { }
public override Task OnTick()
{
var uptime = DateTimeOffset.UtcNow - Program.BotStartTime;
Log($"Bot uptime: {Common.BotUptime}");
return Task.CompletedTask;
}
}
}