maybe, it will be more readable if replace `if-else` with only `if`:
int i = 0;
if (tpsFromStat.compareTo(BigDecimal.ZERO) > 0 && desiredTps.compareTo(BigDecimal.ZERO) > 0) {
.....
}
i = checkDelayInRange(i);