{"version":3,"sources":["jsdelivr-header.js","/npm/time-measurement@0.0.4/src/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,2FCNA,IAAA,YAAA,QAAA,cAEA,MAAM,gBAMF,YAAY,GAAW,KAHvB,WAAa,IAAS,MAAM,CAAN,EAGC,KAFvB,gBAAkB,IAAI,IAEC,KAKvB,YAAc,CAAC,EAAM,OAAQ,EAAO,MAEhC,MAAM,EAAY,wBAAY,MAC9B,IACA,MAAM,EAAI,KAAK,MAAM,wBAAY,MAAQ,GACzC,KAAK,WAAY,GAAE,IAAO,GAAQ,MAAM,QAAxC,EAVmB,KAavB,iBAAmB,CAAC,EAAY,KAAO,KAAK,gBAAgB,IAAI,EAAU,wBAAY,OAb/D,KAcvB,eAAiB,CAAC,EAAY,KAAO,KAAK,WAAY,GAAE,OAAe,KAAK,MAAM,wBAAY,MAAQ,KAAK,gBAAgB,IAAI,YAbvH,IAAa,KAAK,WAAa,GACnC,KAAK,gBAAgB,IAAI,GAAG,wBAAY,MAC3C,E,aAcU,gB","file":"/npm/time-measurement@0.0.4/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/time-measurement@0.0.4/lib/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { performance } from \"perf_hooks\";\n\nclass TimeMeasurement\n\n{\n    logOutFunc = text =>{ throw text }\n    measuringPoints = new Map();\n\n    constructor(logOutFunc){\n        if( logOutFunc ) this.logOutFunc = logOutFunc;\n        this.measuringPoints.set(\"\",performance.now());\n    }\n\n    measurement = (func =()=>{}, name = \"\" ) =>\n    {\n        const startTime = performance.now();\n        func();\n        const t = Math.round(performance.now() - startTime);       \n        this.logOutFunc(`${name}${name && \"=\"}${t}msec`);\n    }\n\n    StartMeasurement = (pointName = \"\") => this.measuringPoints.set(pointName,performance.now());\n    EndMeasurement = (pointName = \"\") => this.logOutFunc(`${pointName} = ${Math.round(performance.now() - this.measuringPoints.get(pointName))} msec`);\n}\n\nexport default TimeMeasurement\n;\n"]}