lib/utility.js
function createMessageId() {
    var logger = getLogger('utility.createMessageId');
    // Constants
    // Take the time and sum the time-offset with the server clock
    var time = new BigInteger((require('./time').getLocalTime()).toString());
    // Divide the time by 1000 `result[0]` and take the fractional part `result[1]`
    var result = time.divideAndRemainder(thousand);
    // Prepare lower 32 bit using the fractional part of the time
    var lower = result[1].multiply(lowerMultiplier);
    // Create the message id
    var messageId = result[0].shiftLeft(32).add(lower);
    if (logger.isDebugEnabled()) {
        logger.debug('MessageId(%s) was created with time = %s, lower = %s,  messageID binary = %s',
            messageId.toString(16), time, lower, messageId.toString(2));
    }
    return '0x' + messageId.toString(16);
}
function createMessageId() {
    var logger = getLogger('utility.createMessageId');
    // Constants
    // Take the time and sum the time-offset with the server clock
    var time = new BigInteger((require('./time').getLocalTime()).toString());
    // Divide the time by 1000 `result[0]` and take the fractional part `result[1]`
    var result = time.divideAndRemainder(thousand);
    // Prepare lower 32 bit using the fractional part of the time
    var lower = result[1].multiply(lowerMultiplier);
    // Create the message id
    var messageId = result[0].shiftLeft(32).add(lower);
    if (logger.isDebugEnabled()) {
        logger.debug('MessageId(%s) was created with time = %s, lower = %s,  messageID binary = %s',
            messageId.toString(16), time, lower, messageId.toString(2));
    }
    return '0x' + messageId.toString(16);
}
function createMessageId ( ) { var logger = getLogger ( 'utility.createMessageId' ) ; // Constants // Take the time and sum the time-offset with the server clock var time = new BigInteger ( ( require ( './time' ) . getLocalTime ( ) ) . toString ( ) ) ; // Divide the time by 1000 `result[0]` and take the fractional part `result[1]` var result = time . divideAndRemainder ( thousand ) ; // Prepare lower 32 bit using the fractional part of the time var lower = result [ 1 ] . multiply ( lowerMultiplier ) ; // Create the message id var messageId = result [ 0 ] . shiftLeft ( 32 ) . add ( lower ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( 'MessageId(%s) was created with time = %s, lower = %s,  messageID binary = %s' , messageId . toString ( 16 ) , time , lower , messageId . toString ( 2 ) ) ; } return '0x' + messageId . toString ( 16 ) ; }
Create a message ID starting from the local time
Create a message ID starting from the local time