How do I play a looping montage for x seconds?

I’m making a combat system and would like have the character enter a parry stance. I would like the time they are in this stance to be a variable so I can adjust it later, increasing or decreasing their parry window.

Is there a way to play a montage for x amount of time to achieve this, or some other solution? Or do I have to make the anim itself run for the amount of time I want?