JAL-1988 property based fake delay whilst saving project file
authorBen Soares <b.soares@dundee.ac.uk>
Fri, 23 Sep 2022 17:28:14 +0000 (18:28 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Fri, 23 Sep 2022 17:28:14 +0000 (18:28 +0100)
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;