I am making an idle game that involves you placing things on tiles to earn money. How would I go about causing something to run for a certain amount of time, and run only once a second without pausing the whole program?
// instance field
private int timer;
// in act method
timer = (timer+1)%50;
if (timer < 10)
{
< do something >
}