cs-codex-dist-tests/Framework/Utils/BlockInterval.cs

31 lines
666 B
C#

namespace Utils
{
public class BlockInterval
{
public BlockInterval(TimeRange timeRange, ulong from, ulong to)
{
if (from < to)
{
From = from;
To = to;
}
else
{
From = to;
To = from;
}
TimeRange = timeRange;
}
public ulong From { get; }
public ulong To { get; }
public TimeRange TimeRange { get; }
public ulong NumberOfBlocks => To - From;
public override string ToString()
{
return $"[{From} - {To}]";
}
}
}