Innovenergy_trunk/csharp/Lib/Time/Unix/UnixTimeSpan.Converters.cs

9 lines
352 B
C#
Raw Normal View History

namespace InnovEnergy.Lib.Time.Unix;
public readonly partial struct UnixTimeSpan
{
public TimeSpan ToTimeSpan() => TimeSpan.FromSeconds(Ticks);
public static implicit operator TimeSpan(UnixTimeSpan unixTimeSpan) => unixTimeSpan.ToTimeSpan();
public static implicit operator UnixTimeSpan(TimeSpan timeSpan) => FromTimeSpan(timeSpan);
}