For a java project of mine, a method must performn an action only after a certain amount of time passes. Yet, I am unsure how to really do that.
My project is a finance manager which, should, do most of the work automatically. As of now, this pass of time is simulated with a button that leads to the method perfoming it’s action. The action being just adding and subtracting the income and expenses before adding that sum to a value equivalent of ones bank account. But pressing this button has to be done manually, and I doubt a user would want that, which is why I want it to be autmoized via time passing.
And my problem is, I don’t know how to do that. I even have trouble explaining all of this here, and that’s why I can’t really ask Google.
Does any one have solution for this? Or at least an idea on what might be a good way to solve it.
I thought maybe something like having my projekt read the system’s or cpu’s time, but I also don’t know to do that, or if that even is a good solution.
Also, sorry for my poor explanaiton! English isn’t my first language, so please tell me if something I said does’t make sense.
Edit: I’m working in Eclipse. I don’t know if that’s important info, but I definitly forgot to mention that.