B4J Question Delay function in microseconds

Erel

B4X founder
Staff member
Licensed User
Longtime User
Usually the best way to manage network connections is with AsyncStreams. An event will be raised when the data is available.

You can use a timer with an interval of 40ms or you can create a "busy loop:
B4X:
Sub Wait(ms As Int)
 Dim n As Long = DateTime.Now + ms
 Do While DateTime.Now < n
 Loop
End Sub
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
Hi all,
The wait() is alike doevents in vb6.0,isn't it?
 
Upvote 0
Top