I have wondered this in the past too and don’t know the anwser.
I think it depends on what system you’re referring too. Going by low level niggles I’ve experienced, activating the muscles and getting blood flow to them I think has benefits which can last throughout the day and has put me in a better position for when I’ve started exercising than had I not have done them.
I would think a 15 minute cycle would be fine (if not beneficial to warming up) between warming up and swimming, it’d certainly keep your cardio system going. .
If doing particularly intense strength or cardio a warm up closer to when you start the exercise would probably be better at a guess.