IW4M-Admin/SharedLibraryCore/Helpers/PlayerHistory.cs
RaidMax 8667532d24 remove create proxy as it's not even used anymore
more fixes for alias stuff
hopefully fix rare bug where client activity cshtml loop goes oob
add URLProtocol format to event parsers to allow connecting through webfront
2019-04-06 21:48:49 -05:00

36 lines
886 B
C#

using System;
namespace SharedLibraryCore.Helpers
{
public class PlayerHistory
{
// how many minutes between updates
public static readonly int UpdateInterval = 5;
public PlayerHistory(int cNum)
{
DateTime t = DateTime.UtcNow;
When = new DateTime(t.Year, t.Month, t.Day, t.Hour, Math.Min(59, UpdateInterval * (int)Math.Round(t.Minute / (float)UpdateInterval)), 0);
y = cNum;
}
private DateTime When;
/// <summary>
/// Used by CanvasJS as a point on the x axis
/// </summary>
public string x
{
get
{
return When.ToString("yyyy-MM-ddTHH:mm:ssZ");
}
}
/// <summary>
/// Used by CanvasJS as a point on the y axis
/// </summary>
public int y { get; }
}
}