calculation of scheduling duration time