HElP, Counter to 9 with a shift register without delay not working

hello everybody, thank you in advance for your reply and help, I make counter from 0 to 9 without delay but i can not make it , can me some one remodel code to see how it would work out with the function of Millis. https://www.arduino.cc/en/Tutorial/BlinkWithoutDelay

const int latchPin = 2; const int dataPin = 3; const int clockPin = 4;

int ledState1 = LOW; int ledState2 = LOW; int ledState3 = LOW;

unsigned long previousMillis = 0;

const long interval = 1000;

void setup() {

pinMode(latchPin, OUTPUT); pinMode(dataPin, OUTPUT); pinMode(clockPin, OUTPUT); }

void loop() {

unsigned long currentMillis = millis();

if (currentMillis - previousMillis >= interval) {

previousMillis = currentMillis;

if (ledState1 == LOW) { ledState1 = HIGH; } else { ledState1 = LOW; }

digitalWrite(latchPin, ledState1);

if (ledState2 == LOW) { ledState2 = HIGH; } else { ledState2 = LOW; }

digitalWrite(dataPin, ledState2);

if (ledState3 == LOW) { ledState3 = HIGH; } else { ledState3 = LOW; }

digitalWrite(clockPin, ledState3);

//0 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 64); digitalWrite(latchPin, HIGH); //1 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 121); digitalWrite(latchPin, HIGH);

//2 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 36); digitalWrite(latchPin, HIGH);

//3 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 48); digitalWrite(latchPin, HIGH);

//4 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 25); digitalWrite(latchPin, HIGH);

//5 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 18); digitalWrite(latchPin, HIGH);

//6 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 2); digitalWrite(latchPin, HIGH);

//7 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 120); digitalWrite(latchPin, HIGH);

//8 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 0); digitalWrite(latchPin, HIGH);

//9 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 24); digitalWrite(latchPin, HIGH);

} }

    if (ledState3 == LOW) {
      ledState3 = HIGH;
    } else {
      ledState3 = LOW;
    }

    digitalWrite(clockPin, ledState3);

Why are you toggling the clock (and data) pin every second? Did the example using delay() do that? I doubt it.

I don't understud you