docs: function uuidTimeBased(nodeId, options, callback) {
  
      var mTime = Date.now();
      var nTime = lastNTime + 1;
      var delta = (mTime - lastMTime) + (nTime - lastNTime) / 10000;
  
      if (delta < 0) {
          clockSeq = (clockSeq + 1) & 0x3fff;
          nTime = 0;
      } else if (mTime > lastMTime) {
          nTime = 0;
      } else if (nTime >= 10000) {
          return moreThan10000;
      }
  
      lastMTime = mTime;
      lastNTime = nTime;
  
      // unix timestamp to gregorian epoch as per rfc4122#section-4.5
      mTime += 12219292800000;
  
      var buffer = newBufferFromSize(16);
      var myClockSeq = options.clockSeq === undefined ?
              clockSeq : (options.clockSeq & 0x3fff);
      var timeLow = ((mTime & 0xfffffff) * 10000 + nTime) % 0x100000000;
      var timeHigh = (mTime / 0x100000000 * 10000) & 0xfffffff;
  
      buffer[0] = timeLow >>> 24 & 0xff;
      buffer[1] = timeLow >>> 16 & 0xff;
      buffer[2] = timeLow >>> 8 & 0xff;
      buffer[3] = timeLow & 0xff;
  
      buffer[4] = timeHigh >>> 8 & 0xff;
      buffer[5] = timeHigh & 0xff;
  
      buffer[6] = (timeHigh >>> 24 & 0x0f) | 0x10;
      buffer[7] = (timeHigh >>> 16 & 0x3f) | 0x80;
  
      buffer[8] = myClockSeq >>> 8;
      buffer[9] = myClockSeq & 0xff;
  
      var result;
      switch (options.encoding && options.encoding[0]) {
          case "b":
          case "B":
              buffer[10] = nodeId[0];
              buffer[11] = nodeId[1];
              buffer[12] = nodeId[2];
              buffer[13] = nodeId[3];
              buffer[14] = nodeId[4];
              buffer[15] = nodeId[5];
              result = buffer;
              break;
          case "o":
          case "U":
              buffer[10] = nodeId[0];
              buffer[11] = nodeId[1];
              buffer[12] = nodeId[2];
              buffer[13] = nodeId[3];
              buffer[14] = nodeId[4];
              buffer[15] = nodeId[5];
              result = new UUID(buffer);
              break;
          default:
              result = byte2hex[buffer[0]] + byte2hex[buffer[1]] +
                       byte2hex[buffer[2]] + byte2hex[buffer[3]] + "-" +
                       byte2hex[buffer[4]] + byte2hex[buffer[5]] + "-" +
                       byte2hex[buffer[6]] + byte2hex[buffer[7]] + "-" +
                       byte2hex[buffer[8]] + byte2hex[buffer[9]] + "-" +
                       byte2hex[nodeId[0]] + byte2hex[nodeId[1]] +
                       byte2hex[nodeId[2]] + byte2hex[nodeId[3]] +
                       byte2hex[nodeId[4]] + byte2hex[nodeId[5]];
              break;
      }
      if (callback) {
          setImmediate(function () {
              callback(null, result);
          });
      }
      return result;
  }