mirror of
https://github.com/sphildreth/roadie
synced 2024-11-26 22:20:21 +00:00
18 lines
420 B
C#
18 lines
420 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Roadie.Library.Extensions
|
|
{
|
|
public static class TimeSpanExt
|
|
{
|
|
public static string ToDuration(this TimeSpan input)
|
|
{
|
|
if(input == null || input.TotalMilliseconds == 0)
|
|
{
|
|
return "--/--/--";
|
|
}
|
|
return input.ToString(@"ddd\.hh\:mm\:ss");
|
|
}
|
|
}
|
|
}
|