i want to time how long it takes to query my database on my ASP page.
in VBScript is Timer the only timing function I have access to ?? Is this the best accuracy I can get (accurate to 1s) ??
I would like up to ms accuracy!
Thanks.
Printable View
i want to time how long it takes to query my database on my ASP page.
in VBScript is Timer the only timing function I have access to ?? Is this the best accuracy I can get (accurate to 1s) ??
I would like up to ms accuracy!
Thanks.
you probably don't want to make a VB component to get it for you, but this server side javascript works well...
enjoy
Code:<%@ Language=VBScript%>
<SCRIPT LANGUAGE=JAVASCRIPT RUNAT=SERVER>
function getMscs()
{
var d = new Date();
return(d.getMilliseconds());
}
</SCRIPT>
<HTML>
<BODY>
<%
dim lngCounter
'show start MS
Response.Write "START: " & getMscs()
%>
<BR>
HELLO WORLD
<BR>
<%
'do stuff
for lngCounter = 1 to 100000
lngCounter = lngCounter + 1
next
'show end MS
Response.Write "END: " & getMscs()
%>
</BODY>
</HTML>
Tom
Thanks for the code.
/d8/