Results 1 to 4 of 4

Thread: timing in my asp page

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    142
    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.

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    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

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    142
    Thanks for the code.
    /d8/

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Thumbs up


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width