Your solution looks more correct than mine.
But if the main problem was that the number of triggers was stable, and to agree that the short interval would not be shorter than the frame - then my solution, simpler in my opinion, also has a place to be.