src/util/logger.js
function getCurrentTimeString() {
    var today = new Date();
    var hh = today.getHours();
    var mm = today.getMinutes(); //January is 0
    var ss = today.getSeconds();
    var ms = today.getMilliseconds();

    if (hh < 10) {
        hh = '0' + hh;
    }

    if (mm < 10) {
        mm = '0' + mm;
    }

    if (ss < 10) {
        ss = '0' + ss;
    }

    if (ms < 10) {
        ms = '0' + ms;
    }

    return hh + ":" + mm + ":" + ss + ":" + ms;
}
function getCurrentTimeString() {
    var today = new Date();
    var hh = today.getHours();
    var mm = today.getMinutes(); //January is 0
    var ss = today.getSeconds();
    var ms = today.getMilliseconds();

    if (hh < 10) {
        hh = '0' + hh;
    }

    if (mm < 10) {
        mm = '0' + mm;
    }

    if (ss < 10) {
        ss = '0' + ss;
    }

    if (ms < 10) {
        ms = '0' + ms;
    }

    return hh + ":" + mm + ":" + ss + ":" + ms;
}
function getCurrentTimeString ( ) { var today = new Date ( ) ; var hh = today . getHours ( ) ; var mm = today . getMinutes ( ) ; //January is 0 var ss = today . getSeconds ( ) ; var ms = today . getMilliseconds ( ) ; if ( hh < 10 ) { hh = '0' + hh ; } if ( mm < 10 ) { mm = '0' + mm ; } if ( ss < 10 ) { ss = '0' + ss ; } if ( ms < 10 ) { ms = '0' + ms ; } return hh + ":" + mm + ":" + ss + ":" + ms ; }
Get the current time as a string
@returns {string} - the current time in a hh:mm:ss string
Get the current time as a string