Using millis for counting and cummulating a button push time

And here it is better formatted and in code tags. OP please note

void loop()
{
  unsigned long NowMillis = millis();
  if (NowMillis - BeforeMillis >= 1000 )
  {
    BeforeMillis = NowMillis;
    if (digitalRead (BUTTON_PIN) == 0) // Pressed
    {
      CumulatedUpTime++;
    }
    else
    {
      CumulatedUpTime = CumulatedUpTime;
    }
  }
  Serial.print("CumulatedUpTime = ");
  Serial.print(CumulatedUpTime);
  Serial.print("digitalRead (   BUTTON_PIN) = ");
  Serial.println(digitalRead (BUTTON_PIN));
}

A question for you

    else
    {
      CumulatedUpTime = CumulatedUpTime;
    }

Why do this ?