1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

Initial .net 6 upgrades

This commit is contained in:
RaidMax
2022-01-26 10:32:16 -06:00
parent 513f0afd34
commit 6f6dd035ee
170 changed files with 2805 additions and 2577 deletions

View File

@ -8,28 +8,23 @@ namespace SharedLibraryCore.Helpers
// how many minutes between updates
public static readonly int UpdateInterval = 5;
private readonly DateTime When;
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);
var 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
/// Used by CanvasJS as a point on the x axis
/// </summary>
public string x
{
get
{
return When.ToString("yyyy-MM-ddTHH:mm:ssZ");
}
}
public string x => When.ToString("yyyy-MM-ddTHH:mm:ssZ");
/// <summary>
/// Used by CanvasJS as a point on the y axis
/// Used by CanvasJS as a point on the y axis
/// </summary>
public int y { get; }
@ -42,4 +37,4 @@ namespace SharedLibraryCore.Helpers
};
}
}
}
}