function time(key, fn) {
        if (typeof data[key] === "undefined") {
            data[key] = 0;
        }

        return function(...args) {
            let t = process.hrtime();

            fn(...args);
            t = process.hrtime(t);
            data[key] += t[0] * 1e3 + t[1] / 1e6;
        };
    }
function time(key, fn) {
        if (typeof data[key] === "undefined") {
            data[key] = 0;
        }

        return function(...args) {
            let t = process.hrtime();

            fn(...args);
            t = process.hrtime(t);
            data[key] += t[0] * 1e3 + t[1] / 1e6;
        };
    }
function time ( key , fn ) { if ( typeof data [ key ] === "undefined" ) { data [ key ] = 0 ; } return function ( ... args ) { let t = process . hrtime ( ) ; fn ( ... args ) ; t = process . hrtime ( t ) ; data [ key ] += t [ 0 ] * 1e3 + t [ 1 ] / 1e6 ; } ; }
Time the run
@param {*} key key from the data object
@param {Function} fn function to be called
@returns {Function} function to be executed
@private
Time the run
get time function