I made a simple timer to test the Sleep function, as in code below, and noticed that when I click the label, it logs as if I have clicked it twice.
Could anyone tell me, please, why this happens?
Could anyone tell me, please, why this happens?
B4X:
Private Sub Label3_Click
IsRunning = Not(IsRunning)
Do While True
If Not(IsRunning) Then
Log("Stop")
Exit
End If
Label3.Text = DateTime.Time(DateTime.Now)
Sleep(1000)
Loop
End Sub