duration-calculation