Hi,
Hm... this code say true only for time lower than 1 minute (< 30 sec in fact, since round goes up).
Notice that number of hours, minutes and second should be calculated as a PARTS of a bigger sum.
Otherwise adding hr + minutes + seconds gives us a time 3 times bigger (more or less around).
So,
var start = new Date().getTime(); //Your scripts goes here. var end = new Date().getTime(), time = end - start, mH = ("0" + Math.floor(time/3600000) ).slice(-2), // upto 99 hours be awared mM = ("0" + Math.floor( (time%3600000) / 60000 ) ).slice(-2), mS = ("0" + (time%60000) / 1000).slice(-2); alert(mH + ":" + mM + ":" + mS);
Jarek