hi guys , i was optimizing my html5 game engine for performance issues and i want to know how much time a render process needs.So i got a bunch of render functions.Each of them render seperated parts of the game.. such as blocks , players etc.
function gameRender() {
var d1 = new Date();
var firstTime = d1.getTime();
// render stuff
var second = d1.getTime();
console.log("Renders took " + (second-firstTime));
}