 // const byte maxm2_offset = 15;
 
 // Length of time check cycle in seconds
-const byte check_cycle = 60;
-// const byte check_cycle = 15;
+const word check_cycle = 60;
+// const word check_cycle = 15;
+
+// Number of time check cycles before refreshing the millis()-based
+// RTC from real RTC. For example with the time check cycle is 60
+// (once per minute), set the RTC_refresh_cycle to 720 to refresh
+// every 12 hours.
+// const int mRTC_refresh_cycle = 720;
+const int mRTC_refresh_cycle = 5;
 
 // LEDs
 const byte led1 = 1;

        case MAXM1:
            if (!maxms_awake) break;

            scheduler.timer(MAXM1, maxm1_cycle * 10);
            scheduler.timer(MAXM2, maxm2_offset * 10);
            doFlash(ledPort, led1, 1);
            maxmRun(maxm1);
            // maxm1.send();

// Uncomment for LEDs flashing for debug
#define DEBUG_FLASH
// Uncomment for debug traces on the serial line
// #define DEBUG_TRACE 

#include <JeeLib.h>
#include <Wire.h> // needed to avoid a linker error :(
