I’m currently porting a pocket PC application to Android. This application uses 3 timers: 1s preset, 100ms preset and 50ms preset. I was not the one that wrote the pocket PC app, but from what I know it runs reasonably well.
I'm used to design embedded devices with hardware timers that are accurate and timer-interrupts that are trigger as expected (no delays), but unfortunately I found out that timer(Android) is not accurate and after doing some research here in the forum, I could confirm it.
Using while loop or similar is not a good choice as in this case the 100ms timer runs a state machine and the 50ms timer polls information from a device, which means I cannot hold the entire app to count time.
I would like to know if anyone has come through the same kind of scenario or if someone can suggest what would be the best solution for this type of application.
Thanks in advance.
I'm used to design embedded devices with hardware timers that are accurate and timer-interrupts that are trigger as expected (no delays), but unfortunately I found out that timer(Android) is not accurate and after doing some research here in the forum, I could confirm it.
Using while loop or similar is not a good choice as in this case the 100ms timer runs a state machine and the 50ms timer polls information from a device, which means I cannot hold the entire app to count time.
I would like to know if anyone has come through the same kind of scenario or if someone can suggest what would be the best solution for this type of application.
Thanks in advance.