Рет қаралды 415
I need to get execution time in milliseconds.
Note: I originally asked this question back in 2008. The accepted answer then was to use new Date().getTime() However, we can all agree now that using the standard performance.now() API is more appropriate. I am therefore changing the accepted answer to this one.
performance.now(): developer.mozilla.org/en-US/d...
performance: nodejs.org/api/perf_hooks.htm... console.time: developer.mozilla.org/en-US/d...
living standard: console.spec.whatwg.org/#java... MDN documentation: developer.mozilla.org/en-US/d...
Node.js documentation: nodejs.org/api/console.html#c...