@Override
    public void onChanged(double progress) {
        if (!ResamplerHelper.quiet) {
            int eta, pc;
            long t;

            t = System.currentTimeMillis() - starttime;
            if (progress == 0) {
                eta = 0;
            } else {
                eta = (int) (t * (1 - progress) / progress);
            }

            pc = (int) (progress * 100);
            if (pc != lastshowed2 || t != lastshowed) {
                System.out.print(String.format(" %3d%% processed", pc));
                lastshowed2 = pc;
            }
            if (t != lastshowed) {
                System.out.print(String.format(", ETA = %7.3fsec  ", (float) eta / 1000));
                lastshowed = t;
            }
            System.out.print("\r");
            System.out.flush();

            if (progress == 1) {
                System.out.println(String.format("Total Time %7.3fsec                 ", (float) t / 1000));
                setStartTime();
            }
        }
    }