19 lines
600 B
C#
19 lines
600 B
C#
// namespace InnovEnergy.Lib.Time.Unix;
|
|
//
|
|
// public readonly partial struct UnixTime
|
|
// {
|
|
// public static UnixTime FromTicks(Int32 ticks) => new UnixTime { Ticks = ticks };
|
|
//
|
|
// public static UnixTime FromUtcDateTime(DateTime dateTime)
|
|
// {
|
|
// var timeSinceEpoch = dateTime - DateTime.UnixEpoch;
|
|
// var ticks = (Int32) timeSinceEpoch.TotalSeconds;
|
|
//
|
|
// return new UnixTime{ Ticks = ticks};
|
|
// }
|
|
//
|
|
// public static UnixTime Epoch => new UnixTime { Ticks = 0 };
|
|
// public static UnixTime Now => FromUtcDateTime(DateTime.UtcNow);
|
|
//
|
|
//
|
|
// } |