BF2Statistics.Web.Bf2Stats.BF2PageModel.FormatTime C# (CSharp) Method

FormatTime() public method

Formats an integer timestamp to a timespan format that was used in BF2sClone
public FormatTime ( double Time ) : string
Time double
return string
        public string FormatTime(double Time)
        {
            TimeSpan Span = TimeSpan.FromSeconds(Time);

            // We don't want the Timespan rounding up the fraction of total hours
            // so we will make our own method for calculation...
            double hours = (Span.Days * 24) + Span.Hours;
            return String.Format(SpecificCulture, "{0:00}:{1:00}:{2:00}", hours, Span.Minutes, Span.Seconds);
        }