how reliable is the stopwatch.start method????

Johnson

Well-known member
Joined
Mar 6, 2009
Messages
158
Programming Experience
Beginner
Getting some right odd results. I use it as a timer(obviously) to get the lapsed time of an upload. Something that took 2 secs it said 12. then 8 then bla bla.

her eis my code

VB.NET:
stopWatch.Start()

Not much to show there. thats started on upload

VB.NET:
            Dim ts As TimeSpan = stopWatch.Elapsed
            ' Format and display the TimeSpan value.
            ToolStripStatusLabel2.Text = String.Format("Picture sent... {0:00}.{1:00} Secs", _
                         ts.Seconds, ts.Milliseconds / 10)

Everything looks right. and it seemed to be working. Just in no way did it take 8 or 12 secs to send
 
Stopwatch is as realiable as time gets. I can help thinking there is more to the picture than you're telling.
 
I'm sorted. The stopwatch was not resetting and just continuing when i resent an image

was missing stopWatch.Reset()
 
Back
Top