mirzao
Active member
Hi,
I used datetime function to know how much time it takes to finish the lines inside a do loop. But the problem is, it only gives me the correct value for the first 20 loops for example and then it start to give the wrong value.
I convert the timespan into integer because I want to use it in calculation.Anyone can point me the problem?many thanks
I used datetime function to know how much time it takes to finish the lines inside a do loop. But the problem is, it only gives me the correct value for the first 20 loops for example and then it start to give the wrong value.
Do
starttime=datetime.now
For
'do sth
next
stoptime=datetime.now
span=stoptime.subtract(starttime)
dt = CInt(span.Seconds)
Label1.Text = dt
Loop
I convert the timespan into integer because I want to use it in calculation.Anyone can point me the problem?many thanks