VB.Net program to print the elapsed milliseconds of stopwatch using Thread.Sleep() method
'Vb.Net program to print the elapsed milliseconds of
'stopwatch using Thread.Sleep() method.
Imports System.Threading
Module Module1
Sub Main()
Dim watch As Stopwatch = Stopwatch.StartNew()
Thread.Sleep(2000)
watch.Stop()
Console.WriteLine("Elapsed Milliseconds by ThreadSleep() : {0}", watch.ElapsedMilliseconds)
End Sub
End Module
Elapsed Milliseconds by ThreadSleep() : 2007
Press any key to continue . . .
Table of Contents