Innovenergy_trunk/csharp/Lib/Time/Unix/UnixTimeDeltaExtensions.cs

16 lines
941 B
C#
Raw Normal View History

namespace InnovEnergy.Lib.Time.Unix;
2023-02-16 12:57:06 +00:00
public static class UnixTimeDeltaExtensions
{
public static UnixTimeSpan Seconds(this Int32 s) => UnixTimeSpan.FromSeconds(s);
public static UnixTimeSpan Minutes(this Int32 m) => UnixTimeSpan.FromMinutes(m);
public static UnixTimeSpan Hours (this Int32 h) => UnixTimeSpan.FromHours (h);
public static UnixTimeSpan Days (this Int32 d) => UnixTimeSpan.FromDays (d);
public static UnixTimeSpan Weeks (this Int32 w) => UnixTimeSpan.FromWeeks (w);
public static UnixTimeSpan Seconds(this UInt32 s) => UnixTimeSpan.FromSeconds(s);
public static UnixTimeSpan Minutes(this UInt32 m) => UnixTimeSpan.FromSeconds(m);
public static UnixTimeSpan Hours (this UInt32 h) => UnixTimeSpan.FromMinutes(h);
public static UnixTimeSpan Days (this UInt32 d) => UnixTimeSpan.FromHours (d);
public static UnixTimeSpan Weeks (this UInt32 w) => UnixTimeSpan.FromDays (w);
}