mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-14 10:05:44 +00:00
15 lines
385 B
C#
15 lines
385 B
C#
namespace FFMpegCore.Extend;
|
|
|
|
public static class TimeSpanExtensions
|
|
{
|
|
public static string ToLongString(this TimeSpan timeSpan)
|
|
{
|
|
var hours = timeSpan.Hours;
|
|
if (timeSpan.Days > 0)
|
|
{
|
|
hours += timeSpan.Days * 24;
|
|
}
|
|
|
|
return $"-ss {hours:00}:{timeSpan.Minutes:00}:{timeSpan.Seconds:00}.{timeSpan.Milliseconds:000}";
|
|
}
|
|
}
|