@SuppressWarnings("deprecation") public void notifyChangedSlot(LocoNetSlot s){
  if (s.getSlot() != LnConstants.FC_SLOT) {
    return;
  }
  if (!correctFastClock && !synchronizeWithInternalClock && !setInternal) {
    return;
  }
  if (log.isDebugEnabled()) {
    log.debug("slot update " + s);
  }
  curDays=s.getFcDays();
  curHours=s.getFcHours();
  curMinutes=s.getFcMinutes();
  int temRate=s.getFcRate();
  if ((temRate != curRate) && !setInternal) {
    setRate(curRate);
  }
 else   if ((temRate != curRate) && setInternal) {
    try {
      clock.userSetRate(temRate);
    }
 catch (    jmri.TimebaseRateException e) {
      if (!timebaseErrorReported) {
        timebaseErrorReported=true;
        log.warn("Time base exception on setting rate from LocoNet");
      }
    }
  }
  curFractionalMinutes=s.getFcFracMins();
  Date tem=clock.getTime();
  int cHours=tem.getHours();
  long cNumMSec=tem.getTime();
  long nNumMSec=((cNumMSec / MSECPERHOUR) * MSECPERHOUR) - (cHours * MSECPERHOUR) + (curHours * MSECPERHOUR) + (curMinutes * MSECPERMINUTE);
  if (readInProgress && !inSyncWithInternalFastClock) {
    nNumMSec+=(long)(((CORRECTION - curFractionalMinutes) / CORRECTION * MSECPERMINUTE));
    clock.setTime(new Date(nNumMSec));
  }
 else   if (setInternal) {
    clock.setTime(new Date(nNumMSec));
  }
  inSyncWithInternalFastClock=true;
}

@ SuppressWarnings ( "deprecation" ) public void notifyChangedSlot ( LocoNetSlot s ) { if ( s . getSlot ( ) != LnConstants . FC_SLOT ) { return ; } if ( ! correctFastClock && ! synchronizeWithInternalClock && ! setInternal ) { return ; } if ( log . isDebugEnabled ( ) ) { log . debug ( "slot update " + s ) ; } curDays = s . getFcDays ( ) ; curHours = s . getFcHours ( ) ; curMinutes = s . getFcMinutes ( ) ; int temRate = s . getFcRate ( ) ; if ( ( temRate != curRate ) && ! setInternal ) { setRate ( curRate ) ; } else if ( ( temRate != curRate ) && setInternal ) { try { clock . userSetRate ( temRate ) ; } catch ( jmri . TimebaseRateException e ) { if ( ! timebaseErrorReported ) { timebaseErrorReported = true ; log . warn ( "Time base exception on setting rate from LocoNet" ) ; } } } curFractionalMinutes = s . getFcFracMins ( ) ; Date tem = clock . getTime ( ) ; int cHours = tem . getHours ( ) ; long cNumMSec = tem . getTime ( ) ; long nNumMSec = ( ( cNumMSec / MSECPERHOUR ) * MSECPERHOUR ) - ( cHours * MSECPERHOUR ) + ( curHours * MSECPERHOUR ) + ( curMinutes * MSECPERMINUTE ) ; if ( readInProgress && ! inSyncWithInternalFastClock ) { nNumMSec += ( long ) ( ( ( CORRECTION - curFractionalMinutes ) / CORRECTION * MSECPERMINUTE ) ) ; clock . setTime ( new Date ( nNumMSec ) ) ; } else if ( setInternal ) { clock . setTime ( new Date ( nNumMSec ) ) ; } inSyncWithInternalFastClock = true ; }
handle changed slot contents , due to clock changes . can get here three ways : 1 ) clock slot as a result of action by a throttle and 2 ) clock slot responding to a read from this module 3 ) a slot not involving the clock changing
