time error in controlling a clock
It is very difficult to accurately control timings with delay(),
because you have to account for the time needed to execute the rest of
the code, including interrupts. You can easily have better accuracy by
using millis() like this:

static unsigned long last_step_time;
unsigned long now = millis();
if (now - last_step_time &gt;= step_delay) {
    do_one_step();
    last_step_time += step_delay;
}


This is almost what you have commented out in your own code, except that
millis() should be called only once per iteration, hence the now
variable.

This may still have less than perfect accuracy due to your clock source.
If your Arduino is clocked from a quartz you should be able to get
decent timing accuracy. If it is clocked from a ceramic oscillator you
are out of luck. In any case, you can always improve the accuracy by
calibrating your clock: you measure its drift and correct for it in
software. Then you have only to worry about thermal fluctuations of the
clock frequency, which should not be an issue with a quarts.

For best accuracy, you can use either an RTC or a watch crystal
connected directly to your ATmega chip. This last solution is only
possible if you go for a bare microcontroller, without the Arduino
board. See this answer
for more details about this option, as well as the way to correct
for the drift in software.