From: Ben Soares Date: Fri, 23 Sep 2022 17:28:14 +0000 (+0100) Subject: JAL-1988 property based fake delay whilst saving project file X-Git-Tag: Release_2_11_3_0~23^2~4^2~36 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f5e62b7ae1c880870d2c162bcd3aa3097f799b41;p=jalview.git JAL-1988 property based fake delay whilst saving project file --- diff --git a/src/jalview/project/Jalview2XML.java b/src/jalview/project/Jalview2XML.java index d4b2c04..d57f58e 100644 --- a/src/jalview/project/Jalview2XML.java +++ b/src/jalview/project/Jalview2XML.java @@ -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;