Library code snippets
Determine execution time in ASP
By Lio_889, published on 22 Feb 2002
This is a very simple and neat script that allows you to determine the time (in Milli seconds) required to execute the code in an ASP page.
<script language=jscript runat=server>
function GetTime()
{
var d = new Date();
return d.getTime();
}
</script>
<%
Dim StartTime, EndTime
StartTime = GetTime()
' Do some stuff
EndTime = GetTime()
Response.Write "Process took: " & Cstr(EndTime - StartTime) & " MilliSeconds."
%>
Related articles
Related discussion
-
Help to Call ASP function from onclick event in HTML to pass an array
by vka (0 replies)
-
Binary Studio | software development outsourcing Ukraine
by shane124 (4 replies)
-
Variable In Vb.Net
by chia (0 replies)
-
ideas in building a captive portal
by sjranjan (2 replies)
-
How to debug classic ASP pages during AJAX calls in ASP.NET website
by andwan0 (0 replies)
Related podcasts
-
Scott Guthrie
Scott catches up with Scott Guthrie in an interview covering Ajax, Asp 2.0, extender controls, CSS adapters and more.
You will get a type mismatch error if you Dim GetTime. It's a function, not a variable.
dim StartTime : StartTime = Timer()
... CODE GOES HERE ...
Response.write(Timer() - StartTime)
This thread is for discussions of Determine execution time in ASP.