@Override
    public void update(GameContainer container, StateBasedGame game, int delta) throws SlickException {
        Input input = container.getInput();
        curMouseX = input.getMouseX();
        curMouseY = input.getMouseY();
        lastUpdate = System.currentTimeMillis();
        float dt = (lastUpdate - prevMillis) / 1000f;
        if (customDT != 0) {
            dt = customDT / 1000f;
        }
        prevMillis = lastUpdate;
        if (running) {
            time += dt;
            count(dt);
            if (followingThePoint) {
                curdFollow += dt;
                graph2X0 -= Math.round(curdFollow / graph2dX);
                curdFollow -= Math.round(curdFollow / graph2dX) * graph2dX;
            }
            if (customDT == 0) {
                frame.setAV(averageDT);
            }
        }
        if (curMouseX > graphSeparation && curMouseX < graphSeparation + width
                && curMouseY > graphSeparation && curMouseY < graphSeparation + height1) {
            float x = (curMouseX - graphSeparation) * graph1dX + graph1X0;
            float y = getValue(graphRes, x);
            if (!Float.isNaN(y)) {
                mouseInfo = "(" + format(x, 2) + "; " + format(y, 2) + ")";
                curX = x;
                curY = y;
            } else {
                mouseInfo = null;
            }
        } else {
            mouseInfo = null;
        }
    }