private double GetPlaytime() { if (LoginMisc.Count > 1) { string pattern = "PlayTime: ([0-9]+) "; var first = Regex.Match(LoginMisc.First(), pattern); var last = Regex.Match(QuitMisc.Last(), pattern); return((int.Parse(last.Groups[1].Value) - int.Parse(first.Groups[1].Value)) / 60); } return(-999); }
private string GetHoursPlayed() { if (LoginMisc.Count > 1) { string pattern = "PlayTime: ([0-9]+) "; var first = Regex.Match(LoginMisc.First(), pattern); var last = Regex.Match(QuitMisc.Last(), pattern); double result = (int.Parse(last.Groups[1].Value) - int.Parse(first.Groups[1].Value)) / 60; return($"({last.Groups[1].Value} - {first.Groups[1].Value})/60 = {result}h"); } return("COULD_NOT_CHECK"); }