diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/ui/swt/Running.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/ui/swt/Running.java index 7a56ab7af77afa9c03ab4ed3c8f6b26edcf636eb..3c6e92d0f4913a8c55c6766ce2a19cd341e4e459 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/ui/swt/Running.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/ui/swt/Running.java @@ -96,7 +96,7 @@ public class Running { this.actualised(); // on demarre le process - final int time = 500; + final int time = 150; t.setDaemon(true); t.start(); final Runnable timer = new Runnable() { @@ -119,20 +119,23 @@ public class Running { } protected void actualised() { + //animation de l'image currentAnim++; if (currentAnim == 8) { currentAnim = 0; } anim.setImage(animatedImage[currentAnim]); - - Runtime run = Runtime.getRuntime(); - long used = (run.totalMemory() - run.freeMemory()) / 1000000; - long total = run.totalMemory() / 1000000; - String S = used + "/" + total + "Mo"; - memory.setText(S); - text.setText(t.getView()); - this.progress.setMaximum(t.get_max_progress()); - this.progress.setSelection(t.get_current_progress()); - + + //on ne met à jour l'interface complete que toute les 150*4=550ms + if (currentAnim == 0 || currentAnim == 4) { + Runtime run = Runtime.getRuntime(); + long used = (run.totalMemory() - run.freeMemory()) / 1000000; + long total = run.totalMemory() / 1000000; + String S = used + "/" + total + "Mo"; + memory.setText(S); + text.setText(t.getView()); + this.progress.setMaximum(t.get_max_progress()); + this.progress.setSelection(t.get_current_progress()); + } } }