Add Duration function.