Does it make a difference how long you exercise?

Like say you're going to go for a walk.. is it better to walk for an hour straight, or break it up into 3 20 min walks?

Is there a benefit to maintaining an elevated heart rate vs letting it drop and elevate again? Or vice verse versa?