In VB, I've developed the habit of using the API QueryPerformanc eCounter to
achieve the most accurate timings.
In VB .NET, one can use TotalMillisecon ds and Ticks to convert time to
milliseconds.
Is this as accurate as using the QueryPerformanc eCounter?
What is the resolution of Now in VB .NET?
For example:
Dim datEnd As Date
Dim datStart As Date
datStart = Now
' Do stuff here
datEnd = Now
MsgBox((datEnd. Ticks - datStart.Ticks) / 10000 & " milliseconds(Ti cks)" &
vbCrLf & _
datEnd.Subtract (datStart).Tota lMilliseconds.T oString() & "
milliseconds(Su btract)")
--
http://www.standards.com/; See Howard Kaikow's web site.
achieve the most accurate timings.
In VB .NET, one can use TotalMillisecon ds and Ticks to convert time to
milliseconds.
Is this as accurate as using the QueryPerformanc eCounter?
What is the resolution of Now in VB .NET?
For example:
Dim datEnd As Date
Dim datStart As Date
datStart = Now
' Do stuff here
datEnd = Now
MsgBox((datEnd. Ticks - datStart.Ticks) / 10000 & " milliseconds(Ti cks)" &
vbCrLf & _
datEnd.Subtract (datStart).Tota lMilliseconds.T oString() & "
milliseconds(Su btract)")
--
http://www.standards.com/; See Howard Kaikow's web site.
Comment