Fix for replenishing schedule
This fixes the unusual replenish per rate schedule, where the replenish
was scheduled as: 1 minute – (n - 1) * timeLapse. It was unintended to
be firstly replenished in 1 minute. Meaning, it should have been
scheduled as (n) * timeLapse.
It is ambiguous why scheduleAtFixedRate method is not executed after an
initial delay, and considers the initial delay variable as a first
period. However, by walking through the previous versions, since it is
evident that scheduleAtFixedRate method indeed considers the initial
delay as the first period, this fixes accordingly.
4 files changed