Wait Pause code

Hello,

Use a Timer to do this.

Code: Copy
Sub Process_Globals
    Dim Timer1 As Timer
End sub

Sub Activity_Create(FirstTime As Boolean)
    ' in 5 seconds time it will run the code in Timer1
    Timer1.Initialize ("Timer1", 5000)
    Timer1.Enabled = True
End Sub

Sub Timer1_tick
    ' Now continue to another sub...
    'Or
    ' Place your code here
End Sub

Or, I have found this code but using a DoWhile may crash the app after time

Code: Copy
Sub Wait(Sekunden As Int)
   Dim Ti As Long
   Ti = DateTime.Now + (Sekunden * 1000)
   Do While DateTime.Now < Ti
      DoEvents
   Loop
End Sub

by calling: Wait ( seconds )
 
Upvote 0

Similar Threads

Replies
43
Views
130K
  • Locked
  • Article Article
Android Tutorial [B4X] SQL with Wait For
Replies
16
Views
43K
Replies
36
Views
137K
Replies
67
Views
140K
  • Locked
  • Article Article
Android Tutorial Google Maps
Replies
192
Views
210K
Back
Top