public void run() {
        seconds = 0;
        while (thread != null) {
            if ((apuLine != null) && (apuLine.isOpen())) {
                long milliseconds = (long) (apuLine.getMicrosecondPosition() / 1000);
                seconds = milliseconds / 1000.0;
            }
            try {
                Thread.sleep(100);
            } catch (Exception e) {
                break;
            }

            repaint();

            while ((apuLine != null && !apuLine.isOpen())) {
                try {
                	Thread.sleep(10);
                } catch (Exception e) {
                    break;
                }
            }
        }
        seconds = 0;
        repaint();
    }