Push Button with two functions

   currState = digitalRead(buttonPin);
   if(currState != prevState)
   {
      // The switch was just pressed or just released
      if(currState == LOW)
      {
         // Aha, it was just pressed
         // right now we know the button was pressed so
         // if the LED is on turn it off
         // if the LED is off turn it on and get the time
      }
   }
   prevState = currState;
   // if the LED is on and enough time has passed turn it off

You'll need to keep track of the state of the LED but you don't need all that counting stuff you did.

XD