code: protected long calculateSleepTime() {
          Calendar c = new GregorianCalendar();
          int currentHour = c.get(Calendar.HOUR_OF_DAY);
          int currentMin = c.get(Calendar.MINUTE);
          int currentSec = c.get(Calendar.SECOND);
          long stime = SECONDS_FOR_24_HOURS - ((currentHour * 60 + currentMin) * 60 + currentSec) + cleanupHour * 60 * 60;
          if (stime > SECONDS_FOR_24_HOURS) {
              stime = stime - SECONDS_FOR_24_HOURS;
          }
          if (stime < 10) {
              stime = 10;
          }
          stime = stime * 1000; // convert to msec
          return stime;
      }
docs: return the sleep time in msec