/** * Calculate and set the cluster clock diff. * * @param masterTime the cluster clock timestamp sent by the master node */ public void setMasterTime(long masterTime) { long diff = masterTime - Clock.currentTimeMillis(); setClusterTimeDiff(diff); }
/** * Calculate and set the cluster clock diff. * * @param masterTime the cluster clock timestamp sent by the master node */ public void setMasterTime(long masterTime) { long diff = masterTime - Clock.currentTimeMillis(); setClusterTimeDiff(diff); }
if (Math.abs(lastClusterTimeDiff - currentClusterTimeDiff) < CLOCK_JUMP_THRESHOLD) { clusterClock.setClusterTimeDiff(currentClusterTimeDiff - clockJump);
if (Math.abs(lastClusterTimeDiff - currentClusterTimeDiff) < CLOCK_JUMP_THRESHOLD) { clusterClock.setClusterTimeDiff(currentClusterTimeDiff - clockJump);