2024-06-08 23:38:55 -05:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
2024-08-04 17:53:19 -05:00
|
|
|
|
namespace LANCommander.Launcher.Extensions
|
2024-06-08 23:38:55 -05:00
|
|
|
|
{
|
|
|
|
|
|
public static class TimeSpanExtensions
|
|
|
|
|
|
{
|
|
|
|
|
|
public static string ToShortTime(this TimeSpan timeSpan)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (timeSpan.TotalHours >= 1)
|
2024-06-09 01:49:47 -05:00
|
|
|
|
return timeSpan.ToString("hh\\:mm\\:ss");
|
2024-06-08 23:38:55 -05:00
|
|
|
|
else
|
2024-06-09 01:49:47 -05:00
|
|
|
|
return timeSpan.ToString("mm\\:ss");
|
2024-06-08 23:38:55 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|