Look up any one of many "re-triggerable one-shot" circuits. You should be able to rig up a good ol' 555 timer (I hate those things, but they are quite versatile!) to do this.
Of course, you can do it with a micro, too. Depending on what micro you use, you may be able to use the output compare/PWM module to do it in hardware. Otherwise use an interrupt and count your cycles carefully.
You can also do it with discrete logic or a PLD. Get a sufficiently large counter, clock it off some faster, ideally synchronous (to the hsync) clock, such as the pixel clock. Either zero or pre-set the counter on one edge of the square hsync input, and compare the output with either your target count or zero, depending on if you're counting up or down, to generate the opposite edge of your output hsync. Target count (or pre-set count) adjusts your sync pulse width.