Feedback Form

Friday, February 01, 2008

Get Difference between 2 times in milliseconds

I got that the best class to get the difference between 2 times in .Net framework is System.Diagnostics.Stopwatch class.

Dim sw As New System.Diagnostics.Stopwatch()
sw.Start()
Threading.Thread.Sleep(2)
MessageBox.Show(sw.ElapsedMilliseconds.ToString())

kick it on DotNetKicks.com


0 comments: