animation duration based on entire animation instead of frame