forked from External/mage
* Some minor changes to sleep command (fixes #2992).
This commit is contained in:
parent
4c35650b2b
commit
5a072ea760
12 changed files with 133 additions and 140 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue