I am testing a method which contain sleep in side it.What is the way to stop invoke sleep() as it makes testing slow?? public void fun(Integer timeToWait) { TimeLimiter timeLimiter = new …
Tag: thread-sleep
How do I make a delay in Java?
I am trying to do something in Java and I need something to wait / delay for an amount of seconds in a while loop. while (true) { if (i == 3) { i = 0; } ceva[i].setSelected(true);…