QCCr_,Vwt,y`3a''.O`q,y`3''.O`q,y`3'`q,Vy`3'CoEabEAX~-| 96999VCB

Sleep` causes a program to suspend operation. This Subroutine receives one parameter, which indicates the number of milliseconds to pause the program. No CPU time is used by Sleep. The program simply ceases to operate.`Example.` This example program invokes the Sleep method on the Thread type. Please note how the Imports System.Threading line is included at the top of the program text. This enables the program to compile correctly. `Calls: `Sleep(0) pauses the program for zero milliseconds. Sleep(5000) pauses for five seconds. Sleep(1000) pauses for one second.`Also,` the SpinWait method is used. This subroutine results in a lot of CPU usage based on the large integer passed to it. SpinWait is the opposite of a Sleep call. It pegs the CPU at 100%. `Summary.` To use the Thread.Sleep or Thread.SpinWait methods, please include the Imports System.Threading namespace. The Thread.Sleep method receives an integer indicating the number of milliseconds you want the program execution to pause. `The Thread.SpinWait method receives an integer indicating the amount of work to do. This results in 100% CPU usage.`Integer `integer-vbnet

*+, Imports +.Threading + +1 *Sub +(), **' C+ a ++sleep +zero milliseconds. **,Dim stopwatch+++stopwatch.+New **,Thread.Sleep(0), **stopwatch+, **' + the current time. **,+stopwatch.ElapsedMilliseconds) **++.Now.ToLongTime+), **' + a ++. **,stopwatch+stopwatch.+New **,Thread.Sleep(5000), **stopwatch+ **+stopwatch.ElapsedMilliseconds) **++.Now.ToLongTime+), **' + a ++. **,stopwatch+stopwatch.+New **,Thread.Sleep(1000), **stopwatch+ **+stopwatch.ElapsedMilliseconds), **' + a +++use SpinWait. **,stopwatch+stopwatch.+New **,Thread.SpinWait(1000000000), **stopwatch+ **+stopwatch.ElapsedMilliseconds) *End Sub End + , 0 9:36:02 AM 4999 9:36:07 AM 999 3128,

!`the Sleep method