Published: Oct 13, 2011 by community
Mat:
curTime = Array();
curTime[0] = (new Date()).getTime();
alert('hello');
curTime[1] = (new Date()).getTime();
alert('world');
curTime[2] = (new Date()).getTime();
for( i=1; i<curTime.length; i++ ){
deltaTime = curTime[i] - curTime[i-1];
console.log( "["+(i-1)+"]-["+i+"] execution time: " + deltaTime + " ms" );
}
deltaTime = curTime[curTime.length-1] - curTime[0] ;
console.log( "Total execution time: " + deltaTime + " ms" );
ben wei:
Arduino 首測試心得: http://ben6.blogspot.com/2011/10/mac-os-xarduino.html