20 lines
1.1 KiB
C#
20 lines
1.1 KiB
C#
|
namespace InnovEnergy.Time.Unix;
|
||
|
|
||
|
public readonly partial struct UnixTime
|
||
|
{
|
||
|
public static UnixTime operator -(UnixTime a, UnixTimeSpan b) => FromTicks(a.Ticks - b.Ticks);
|
||
|
public static UnixTime operator +(UnixTime a, UnixTimeSpan b) => FromTicks(a.Ticks + b.Ticks);
|
||
|
public static UnixTime operator +(UnixTimeSpan a, UnixTime b) => FromTicks(a.Ticks + b.Ticks);
|
||
|
|
||
|
public static UInt32 operator /(UnixTime a, UnixTimeSpan b) => a.Ticks / b.Ticks;
|
||
|
public static UInt32 operator %(UnixTime a, UnixTimeSpan b) => a.Ticks % b.Ticks;
|
||
|
|
||
|
public static Boolean operator < (UnixTime l, UnixTime r) => l.Ticks < r.Ticks;
|
||
|
public static Boolean operator > (UnixTime l, UnixTime r) => l.Ticks > r.Ticks;
|
||
|
public static Boolean operator <= (UnixTime l, UnixTime r) => l.Ticks <= r.Ticks;
|
||
|
public static Boolean operator >= (UnixTime l, UnixTime r) => l.Ticks >= r.Ticks;
|
||
|
public static Boolean operator == (UnixTime l, UnixTime r) => l.Ticks == r.Ticks;
|
||
|
public static Boolean operator != (UnixTime l, UnixTime r) => l.Ticks != r.Ticks;
|
||
|
|
||
|
public static UnixTimeSpan operator -(UnixTime a, UnixTime b) => UnixTimeSpan.FromTicks(a.Ticks - b.Ticks);
|
||
|
}
|