* Some minor changes to sleep command (fixes #2992).

This commit is contained in:
LevelX2 2017-04-02 11:32:25 +02:00
parent 4c35650b2b
commit 5a072ea760
12 changed files with 133 additions and 140 deletions

View file

@ -3,6 +3,7 @@ package mage.client.components;
import java.awt.Component;
import java.util.EnumMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.swing.JButton;
public class MageUI {
@ -94,7 +95,7 @@ public class MageUI {
final JButton j = getButton(name);
Thread.sleep(waitBeforeClick);
while (!j.isEnabled()) {
Thread.sleep(10);
TimeUnit.MILLISECONDS.sleep(10);
}
Thread t = new Thread(() -> j.doClick());
t.start();