Switch with different delays

Would something like this work?

unsigned long start, fin;
bool swState, oldSwState;
const byte sw = 10;


void Setup(){
  pinMode(sw,INPUT_PULLUP);
}

void loop()
{
  swState = digitalRead(sw);

  if(swState != oldSwState)
  { 
    start = millis();
    oldSwState = swState;
  }

  if(swState) fin = 12 * 60 * 1000UL;
    else fin = 12 * 60 * 1000UL;
  
  if(millis() - start > fin)
  {
    start += fin;
    doUpdate;
  }
}