I tried to set a function that adds interest to a balance on a timer. I have tried using the timerstack function and scheduled executor service.
This is the function. It works on its own manually. I would like to make it run every 3 minutes.
public void interest_rate()
{ double interest = 2 ;
balance = balance * (1 + (interest/100));
}