Android Question Delay time function

megzz

Member
Licensed User
Longtime User
Hello,
how I can make this delay to work with nanoseconds?

B4X:
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

Regards
 

DonManfred

Expert
Licensed User
Longtime User
how I can make this delay to work with nanoseconds?
you cant. You can delay a 1/1000 of a second with Milliseconds

What are you trying to archieve?
 
Upvote 0
Top