[Solved] simple Timer question

this is kind same as my timer function. it should work, but I want to learn how to use a signal to add 1 to sec instead of this.

Robin2:
what about something like this (not tested)

void setup() {

unsigned long lastMillis = millis();
   unsigned long curMillis = lastMillis;
   int secs = 0;
   // other setup stuff
}

void loop() {
   curMillis = millis();
   if (curMillis - lastMillis) > 1000 {
   secs ++;
   lastMillis = curMillis;
   
  // other loop stuff
   }
}




...R