LongPress/ShortPress button two functions

 if((beginTime >= timeInterval) && (button1State == LOW))
  {

Should be

 if((millis() >= beginTime + timeInterval) && (button1State == LOW))
  {