logDuration = function (d, prefix) {
    let str = d > 1000 ? (d / 1000).toFixed(2) + "sec" : d + "ms";
    return "\x1b[33m- " + (prefix ? prefix + " " : "") + str + "\x1b[0m";
}
Get log duration
@param {number} d Time in ms
@param {string} prefix Prefix for log
@returns {string} Coloured log string