Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 92406

Re: Re: Script Running time log report

$
0
0

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


Viewing all articles
Browse latest Browse all 92406

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>