PathAnimation: better duration calculation