 
 void loop()
 {
-  unsigned short displayHour;
-  bool setHourPressed = !digitalRead(SET_HOUR), setMinutePressed = !digitalRead(SET_MINUTE);
+  unsigned short hour = milliseconds / hourDivisor % 12,
+                 minute = milliseconds / minuteDivisor % 60,
+                 second = milliseconds / secondDivisor % 60,
+                 displayHour = hour;
+  bool setHourPressed = !digitalRead(SET_HOUR),
+       setMinutePressed = !digitalRead(SET_MINUTE);
 
-  updateTime();
-
+  if (hour == 0)
+  {
+    displayHour = 12;
+  }
+  
   if (setHourPressed && !hourIncremented)
   {
-    if (hour == 11)
-    {
-      setTime(0, minute, second);
-    }
-    else
-    {
-      setTime(hour + 1, minute, second);
-    }
-    
+    milliseconds += hourDivisor;
     hourIncremented = true;
   }
   else if (setMinutePressed && !minuteIncremented)
   {
-    if (minute == 59)
-    {
-      setTime(hour, 0, 0);
-    }
-    else
-    {
-      setTime(hour, minute + 1, 0);
-    }
-    
+    milliseconds += minuteDivisor;
+    milliseconds -= milliseconds % minuteDivisor;
     minuteIncremented = true;
   }
   else if (!setHourPressed && hourIncremented)

  {
    minuteIncremented = false;
  }

  if (hour == 0)
  {
    displayHour = 12;
  }
  else
  {
    displayHour = hour;
  }
  
  displayDigit(displayHour / 10, HOUR_10);
  displayDigit(displayHour % 10, HOUR_1);

#define BLANKING_US 200

volatile unsigned long milliseconds = 0;
const unsigned long millisecondReset = (unsigned long)12 * 60 * 60 * 1000 - 1,
                    secondDivisor = 1000,
                    minuteDivisor = secondDivisor * 60,
                    hourDivisor = minuteDivisor * 60;
bool hourIncremented = false, minuteIncremented = false;

ISR(TIMER2_OVF_vect)
{
  milliseconds++;
  
  if (milliseconds > millisecondReset)
  {
    milliseconds -= millisecondReset;
  }
  
  TCNT2 = 130;
  TIFR2 = 0x00;
}

void displayDigit(unsigned short digit, unsigned short pin)
