Quote:
Originally posted by hpl
I am testing performance and comparing time consumptions in Java and .net and for this I need to calculate in milliseconds. My timestamps are:
time1 = Now.Hour & ":" & Now.Minute & ":" & Now.Second & ":" & Now.Millisecond
when the calculation begins and
time2 = Now.Hour & ":" & Now.Minute & ":" & Now.Second & ":" & Now.Millisecond
How do I subtract the two times when I need milliseconds?
Try
VB Code:
Dim Time1, time2 As DateTime
Dim icount, tCount As Integer
Time1 = Now
For icount = 1 To 10000
TextBox1.Text = Val(icount)
Next
time2 = Now
tCount = time2.Subtract(Time1).Milliseconds()