diff --git a/csharp/Lib/Time/Unix/UnixTime.cs b/csharp/Lib/Time/Unix/UnixTime.cs index f771fd01d..b370ad764 100644 --- a/csharp/Lib/Time/Unix/UnixTime.cs +++ b/csharp/Lib/Time/Unix/UnixTime.cs @@ -8,5 +8,7 @@ public readonly partial struct UnixTime { // IMPORTANT: init is necessary for JSON deserializer // ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global - public UInt32 Ticks { get; init; } + public UInt32 Ticks { get; init; } + + public UnixTime RoundTo(UnixTimeSpan span) => Epoch + this / span * span; } \ No newline at end of file