Hello,
how I can make this delay to work with nanoseconds?
Regards
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