2
0
mirror of synced 2025-02-13 17:06:30 +00:00

31 lines
666 B
C#
Raw Normal View History

2024-02-19 15:20:12 +01:00
namespace Utils
{
2024-03-27 15:39:42 +01:00
public class BlockInterval
2024-02-19 15:20:12 +01:00
{
2024-05-31 10:16:57 +02:00
public BlockInterval(TimeRange timeRange, ulong from, ulong to)
2024-02-19 15:20:12 +01:00
{
if (from < to)
{
From = from;
To = to;
}
else
{
From = to;
To = from;
}
2024-05-31 10:16:57 +02:00
TimeRange = timeRange;
2024-02-19 15:20:12 +01:00
}
public ulong From { get; }
public ulong To { get; }
2024-05-31 10:16:57 +02:00
public TimeRange TimeRange { get; }
public ulong NumberOfBlocks => To - From;
2024-02-19 15:41:48 +01:00
public override string ToString()
{
return $"[{From} - {To}]";
}
2024-02-19 15:20:12 +01:00
}
}