javascript time execution
var t0 = performance.now();
doSomething(); // <---- The function you're measuring time for
var t1 = performance.now();
console.log("Call to doSomething took " + (t1 - t0) + " milliseconds.");
javascript time execution
var t0 = performance.now();
doSomething(); // <---- The function you're measuring time for
var t1 = performance.now();
console.log("Call to doSomething took " + (t1 - t0) + " milliseconds.");
javascript time of execution
const { JSDOM } = require("jsdom");
const { window } = new JSDOM();
var start = window.performance.now();
// task starts
for (var i = 0; i < 100000000;i++);
// task ends
var end = window.performance.now();
console.log(`Execution time: ${end - start} ms`);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us