Stepper Driver pulses control (with Arduino)
The duty cycle is not really what contains the information, so it is uncritical in general. Instead you trigger steps by providing the driver with edges (unlike servos, which are typically controlled by duty cycle).
A short voltage spike or dip (sth like 1% or 99% duty cycle) might not be seen by the driver, though. A 50% duty cycle like in the image is just what you would normally do: equally long high and low times. But, as I mentioned, it's uncritical and you should be fine if the duty cycle varies between maybe 30-70% (probably depends on the speed). Finally, I suggest you try to find out how extreme the duty cycle can be for the driver to still work properly. Then add some margin.
Another thing is your sketch. If you get problems because the loop() has too much else to do, you might want to change your implementation (using interrupts is an idea).