I am reading some serial data across a BLE stream. If I send bytes every 500msec the display updates with the new values. As I drop down to 400msec the display "freezes". If I enter a breakpoint the display updates.
So, here are my questions.
1) It appears that my code must be taking to long to process the data so I was going to measure the amount of time each loop took. Since I am new to B4X I have wasted time trying to figure out how to do this. I thought I would set a timer for 50msec and add 1 to a variable and read the difference. I constantly get 1 for my variable value. Meaning it made it to the timer sub but never returns. So I thought well maybe once it goes tot the timer sub it disables the timer so I re-enable the timer but it still does not return to the sub. So, obviously I don't enter understand the timer method.
2) What is the most efficient way to measure how long a loop takes, in milliseconds (or ticks). DateTimeUtils?
3) Also If I am incorrect on why my display is not updating then feel free to clarify
Thanks for helping a newbie
So, here are my questions.
1) It appears that my code must be taking to long to process the data so I was going to measure the amount of time each loop took. Since I am new to B4X I have wasted time trying to figure out how to do this. I thought I would set a timer for 50msec and add 1 to a variable and read the difference. I constantly get 1 for my variable value. Meaning it made it to the timer sub but never returns. So I thought well maybe once it goes tot the timer sub it disables the timer so I re-enable the timer but it still does not return to the sub. So, obviously I don't enter understand the timer method.
2) What is the most efficient way to measure how long a loop takes, in milliseconds (or ticks). DateTimeUtils?
3) Also If I am incorrect on why my display is not updating then feel free to clarify
Thanks for helping a newbie