Added method calculatePefectTime in CostTab