CALCULATION OF DISCHARGE TIME