class BackgroundActionPauser {

    public void await() {
        if(0 == delay) {
            log.info("No pause between retry");
            return;
        }
        final Timer wakeup = new Timer();
        final CyclicBarrier wait = new CyclicBarrier(2);
        // Schedule for immediate execution with an interval of 1s
        wakeup.scheduleAtFixedRate(new PauserTimerTask(wait), 0, 1000);
        try {
            // Wait for notify from wakeup timer
            wait.await();
        }
        catch(InterruptedException | BrokenBarrierException e) {
            log.error(e.getMessage(), e);
        }
    }

    public  BackgroundActionPauser(final Callback callback);
    public  BackgroundActionPauser(final Callback callback, final Integer delay);

}