In my world, the signs say that courts must be vacated on the hour if someone is waiting. So if you took the court a 2:15, then you must give it to the people who are waiting at 3:00. But if you took the court at 2:00, then you can make them wait until 3:00.
That said, I would finish the balls in the machine and then surrender the court if I had already put in 45 minutes.
I practice by myself a lot. I use a hopper. I make efforts to keep balls away from people who are playing, even if it means I can't do everything I'd like to practice. So you should be careful with your ball machine to avoid bothering others.
-- Random Error Generator, Version 4.0
-- Master Moonballer