var start = new Date(); //do some think that takes a while here var runTime = new Date() - start; console.log("Script took:"+runTime+" Milliseconds to run");