add roundto to unixTime
This commit is contained in:
parent
6270a0d8a3
commit
91c979cca2
|
@ -9,4 +9,6 @@ public readonly partial struct UnixTime
|
||||||
// IMPORTANT: init is necessary for JSON deserializer
|
// IMPORTANT: init is necessary for JSON deserializer
|
||||||
// ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global
|
// ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global
|
||||||
public UInt32 Ticks { get; init; }
|
public UInt32 Ticks { get; init; }
|
||||||
|
|
||||||
|
public UnixTime RoundTo(UnixTimeSpan span) => Epoch + this / span * span;
|
||||||
}
|
}
|
Loading…
Reference in New Issue