public void run() {
            while (true) {
                try {
                    StockControl.doUpdate();
                    Thread.sleep(time);
                } catch (InterruptedException ex) {
                    Logger.getLogger(StockControl.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }