code: public long getGranularity() {
          long now = env.currentTimeMillis();
          long curr = lastSampleTime.get();
          if (now - curr > periodMillis
                  && lastSampleTime.compareAndSet(curr, now)) {
              samples[sampleIndex] = sampleGranularity();
              sampleIndex = (sampleIndex + 1) % samples.length;
              long max = 0L;
              for(long sample : samples) {
                  if (sample > max) max = sample;
              }
              maxGranularity = max;
          }
          return maxGranularity;
      }
docs: /* (non-Javadoc)
  @see org.fishwife.jrugged.clocks.HardwareClock#getGranularity()