If I ever get one of these situations, I'm going to stop the clock, privately ask the Team A HC how much time he will allow his team to stand there with the ball before making a move. Then I will privately ask the Team B HC how much time will he allow this before his team plays defense. Then I will instruct the timer to put on the score clock the value that is furthest from zeros.
Example: 8:00 on the clock, and there's a stall. Team A HC wants 0:15 before offensive movements begin. B HC will play defense at 0:30. I'll put :30 up and away we go. There, I just saved around 7:30.