+
+ final private static void directorsCut(long initDuration) {
+ // final long ms = 128l + (long) (Math.random() * 128d);
+ long ms = initDuration / 100;
+ log.info("Spend " + ms + "ms"
+ + " reflecting on the progress brought to mankind"
+ + " by Free Software...");
+ long beginNano = System.nanoTime();
+ try {
+ Thread.sleep(ms, 0);
+ } catch (InterruptedException e) {
+ // silent
+ }
+ long durationNano = System.nanoTime() - beginNano;
+ final double M = 1000d * 1000d;
+ double sleepAccuracy = ((double) durationNano) / (ms * M);
+ if (log.isDebugEnabled())
+ log.debug("Sleep accuracy: "
+ + String.format("%.2f", 100 - (sleepAccuracy * 100 - 100))
+ + " %");
+ }
+}
\ No newline at end of file