A delay time of function

Sub Delay(nMilliSecond As Long)
Dim nBeginTime As Long
Dim nEndTime As Long
nEndTime = DateTime.Now + nMilliSecond
nBeginTime = DateTime.Now
Do While nBeginTime < nEndTime
nBeginTime = DateTime.Now
Log(nBeginTime)
If nEndTime < nBeginTime Then
Return
End If
DoEvents
Loop
End Sub
 

Askjerry

Member
Licensed User
What does the section...

B4X:
Log(nBeginTime)
Do for the program... it seems to just send a lot of unused data to the console. Can it be removed or remarked out?

Thanks,
Jerry
 
Top