code: synchronized public long generateId48() {
          final long blockSize = 1000L; // block 1000 ms
          long timestamp = System.currentTimeMillis() / blockSize;
          long sequence = 0;
          boolean done = false;
          while (!done) {
              done = true;
              while (timestamp < lastTimestampMillisec.get() / blockSize) {
                  timestamp = waitTillNextSecond(timestamp);
              }
              if (timestamp == lastTimestampMillisec.get() / blockSize) {
                  // increase sequence
                  sequence = sequenceMillisec.incrementAndGet();
                  if (sequence > MAX_SEQUENCE_48) {
                      // reset sequence
                      sequenceMillisec.set(sequence = 0);
                      timestamp = waitTillNextSecond(timestamp);
                      done = false;
                  }
              }
          }
          sequenceMillisec.set(sequence);
          lastTimestampMillisec.set(timestamp * blockSize);
          timestamp = ((timestamp * blockSize - TIMESTAMP_EPOCH) / blockSize) & MASK_TIMESTAMP_48;
          return timestamp << SHIFT_TIMESTAMP_48 | template48 | (sequence & MASK_SEQUENCE_48);
      }
docs: Generates a 48-bit id.
  
  <p>
  Format: {@code <32-bit:timestamp><3-bit:node id><13 bit:sequence number>}. Where
  {@code timestamp} is in seconds, minus the epoch.
  </p>
  
  @return