I have a set of instructions that needs to be executed repeatedly. The repeat delay is variable (the delay is taken from a file).
The repeat time must be very precise (milliseconds precision).
I have tried to use a Handler with postDelayed but the accuracy is lost in time. This happens because the repeat frequency is more than 10 times/second.
Any idea is more than welcomed!
Here is the Handler example:
new Runnable() {
        @Override
        public void run() {              
         mHandler.postDelayed(this, delay);               
         barometerResult.gotBarometer(barometerValueModelList.get(i).getBarometerValue());             
       }
    }.run();
 
    