public void Clear()
 {
     Selection = -1;
     DeathInfos.Clear();
     DeathStatisticsManager.Instance.Clear();
     Save();
 }
        public string GetTotalLostTime()
        {
            long total = DeathInfos.Sum(deathInfo => deathInfo.LostTime);

            TimeSpan totalLostTimeSpan = TimeSpan.FromTicks(total);

            if ((int)totalLostTimeSpan.TotalSeconds < 60)
            {
                return((int)totalLostTimeSpan.TotalSeconds + totalLostTimeSpan.ToString("\\.fff"));
            }

            return(totalLostTimeSpan.ShortGameplayFormat());
        }
        public void Add(DeathInfo deathInfo)
        {
            DeathInfos.Insert(0, deathInfo);
            int max = SpeedrunToolModule.Settings.MaxNumberOfDeathData * 10;

            if (max <= 0)
            {
                max = 90;
            }

            if (DeathInfos.Count > max)
            {
                DeathInfos.RemoveRange(max, DeathInfos.Count - max);
            }
        }