B
Bill Nguyen
The Timer loop below consumes all available CPU time from my development PC.
I would like to be able to restrict its use of CPU time to minimum since
it's not actually doing anything but counting down the time left.
Any help is greatly appreciated.
Bill
Dim t As Integer = 0
Dim Start, Finish, TotalTime As Double
'Start = Microsoft.VisualBasic.DateAndTime.Timer
Finish = Start + mSeconds ' Set end time for mseconds duration.
Do While Microsoft.VisualBasic.DateAndTime.Timer < Finish
t += 1
lblInfo.Text = "test timer -> " & t
lblInfo.Refresh()
' Do other processing while waiting for 5mseconds to elapse.
Loop
I would like to be able to restrict its use of CPU time to minimum since
it's not actually doing anything but counting down the time left.
Any help is greatly appreciated.
Bill
Dim t As Integer = 0
Dim Start, Finish, TotalTime As Double
'Start = Microsoft.VisualBasic.DateAndTime.Timer
Finish = Start + mSeconds ' Set end time for mseconds duration.
Do While Microsoft.VisualBasic.DateAndTime.Timer < Finish
t += 1
lblInfo.Text = "test timer -> " & t
lblInfo.Refresh()
' Do other processing while waiting for 5mseconds to elapse.
Loop