Android Question Create a Faster Timer?

HimeAnator

Member
Licensed User
Longtime User
I'm working on a simple project that turns the device screen into a flashing hazard light, I have gotten it to work using a timer and a two panels and implementing the code below...
B4X:
Sub LightTimer_Tick
If LightCount = 0 Then
Panel1.Color = Colors.ARGB(255,255, 174, 0)
Panel2.Color = Colors.white
LightCount = 1
Else
Panel1.Color = Colors.white
Panel2.Color = Colors.ARGB(255,255, 174, 0)
LightCount = 0
End If
End Sub

The panels alternate color, however 1 second is really too slow for what I am trying to achieve, I want them to change a lot more rapidly/faster. Is there anyway to have the timer tick faster, or is there another way I should go about this? Any help is much appreciated!
 
Top