Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  3] [ 3]  / answers: 1 / hits: 44920  / 15 Years ago, thu, december 31, 2009, 12:00:00

What is a good way to measure code execution time in VBScript?



Or failing that how to do it in JavaScript?


More From » vbscript

 Answers
16

For VBScript you can use Timer:



StartTime = Timer()
EndTime = Timer()
Response.Write(Seconds to 2 decimal places: & FormatNumber(EndTime - StartTime, 2))


Or ASP Profiler (that is for an ASP environment.)



For JavaScript you can use Date:



var start = new Date().getTime()
alert(Milliseconds: + (new Date().getTime() - start))


Firebug also has a profiler for JavaScript.


[#97952] Sunday, December 27, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
malkajillc

Total Points: 652
Total Questions: 107
Total Answers: 98

Location: Finland
Member since Sat, Nov 6, 2021
3 Years ago
malkajillc questions
;