Developing Matt

My Technical Journal

The Millisecond Test

leave a comment »

here’s a quick script (save yourself 10 minutes) that you can use to test how long your procedures take. Btw, there are 1000 milliseconds in a second.

        Dim dteStartDate As Date = Now()
Dim dteStartMilli As Integer = Now().Millisecond

‘Run  procedure #1
Response.Write(“start: ” & dteStartDate & “:” & dteStartMilli & “</br>”)
Response.Write(“end: ” & Now() & “:” & Now.Millisecond)

dteStartDate = Now()
dteStartMilli = Now.Millisecond

‘Run  procedure #2
Response.Write(“</br>the new way took…</br>”)
Response.Write(“start: ” & dteStartDate & “:” & dteStartMilli & “</br>”)
Response.Write(“end: ” & Now() & “:” & Now.Millisecond)

Advertisements

Written by matt

September 11, 2007 at 9:12 am

Posted in Asp.net

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: