Implement getByDuration