private long CalculateJumpGap(long x, long gridSize)
{
if ((x + gridSize) / 864000000000L - x / 864000000000L > 0L && (x + gridSize) % 864000000000L > this.firstSessionTick && gridSize < 576000000000L)
return (x / 864000000000L + 1L) * 864000000000L + this.firstSessionTick - x;
else
return 0L;
}