nl_tokens: Generates a 16 - length Buffer instance
pl_tokens: function generateBuffer ( date , ticks , nodeId , clockId ) { const timeWithTicks = getTimeWithTicks ( date , ticks ) ; nodeId = getNodeId ( nodeId ) ; clockId = getClockId ( clockId ) ; const buffer = utils . allocBufferUnsafe ( 16 ) ; //Positions 0-7 Timestamp writeTime ( buffer , timeWithTicks . time , timeWithTicks . ticks ) ; //Position 8-9 Clock clockId . copy ( buffer , 8 , 0 ) ; //Positions 10-15 Node nodeId . copy ( buffer , 10 , 0 ) ; //Version Byte: Time based //0001xxxx //turn off first 4 bits buffer [ 6 ] = buffer [ 6 ] & 0x0f ; //turn on fifth bit <mask> [ 6 ] = buffer [ 6 ] | 0x10 ; //IETF Variant Byte: 1.0.x //10xxxxxx //turn off first 2 bits buffer [ 8 ] = buffer [ 8 ] & 0x3f ; //turn on first bit buffer [ 8 ] = buffer [ 8 ] | 0x80 ; return buffer ; }