Calculate averange duration time.