I am using a timer that should every 12 seconds issues a warning. as shown in the code below i set the delay to 0 so that the timer starts immediately, but at run time, the below posted timer does not starts immediately it waits for the period set as a delay despit i set the delay to 0
in other words, the below timer should wait 0 sec as a delay and repeats itself every 12 seconds but what happens is, it at initial execution it waits 12 sec and repeat itself every 12 sec
any logical explaination why that is happening
code:
mVelWarningRule1Timer.scheduleAtFixedRate(
new SpeakOut(
getApplicationContext(),
getApplicationContext()
.getResources()
.getString(R.string.rule_velocity_1)),
0,
getApplicationContext()
.getResources()
.getInteger(R.integer.int_assistWarning_interval)
);