JAL-1988 property based fake delay whilst saving project file
[jalview.git] / src / jalview / project / Jalview2XML.java
index d4b2c04..d57f58e 100644 (file)
@@ -616,6 +616,25 @@ public class Jalview2XML
   {
     AlignFrame[] frames = Desktop.getAlignFrames();
 
+    if (Cache.getDefault("DEBUG_DELAY_SAVE", false))
+    {
+      int n = 20;
+      int i = 0;
+      while (i < n)
+      {
+        Console.debug("***** debugging save sleep " + i + "/" + n);
+        try
+        {
+          Thread.sleep(1000);
+        } catch (InterruptedException e)
+        {
+          // TODO Auto-generated catch block
+          e.printStackTrace();
+        }
+        i++;
+      }
+    }
+
     if (frames == null)
     {
       return;