Implement getDuration