* 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

@ -1,7 +1,7 @@
package mage.client.components.tray;
import java.awt.*;
import java.util.concurrent.TimeUnit;
import mage.client.MageFrame;
import org.apache.log4j.Logger;
import org.mage.plugins.card.utils.impl.ImageManagerImpl;
@ -21,7 +21,6 @@ public enum MageTray {
private int state = 0;
public void install() {
if (!SystemTray.isSupported()) {
log.warn("SystemTray is not supported");
@ -97,7 +96,7 @@ public enum MageTray {
int i = 0;
while (state != 3) {
trayIcon.setImage(i == 0 ? mainImage : flashedImage);
Thread.sleep(600);
TimeUnit.MILLISECONDS.sleep(600);
i = i == 0 ? 1 : 0;
}
trayIcon.setImage(mainImage);