public void measure(long time) {
        // sila ktora sa snazi odoslat spravu
        if (player.state == RunState.running)
            force = 1;
        else
            force = 0;

        // spravy si udrzuju rozostupy 
        if ((prevM != null) && (prevM.position - position < defDist)) {
            force -= Math.pow(2 * (defDist - prevM.position + position) / defDist, 2);
        }
        if ((nextM != null) && (position - nextM.position < defDist)) {
            force += Math.pow(1.0 * (defDist - position + nextM.position) / defDist, 2);
        }

        // factor ma kazda sprava vlastny, urci sa nahodne pri vzniku
        force *= getEdgeSpeed() * factor;
        // oznamime modelu svoju chcenu rychlost
        player.listenSpeed(force);

        // tahanie uzivatelom
        if (selected > 0 && selected != 5) {
            double x = edge.from.getX() * (1.0 - position) + edge.to.getX() * position;
            double y = edge.from.getY() * (1.0 - position) + edge.to.getY() * position;
            double x1 = player.graph.listener.xlast - x;
            double y1 = player.graph.listener.ylast - y;
            double x2 = (edge.to.getX() - edge.from.getX());
            double y2 = (edge.to.getY() - edge.from.getY());
            double prod = (x1 * x2 + y1 * y2) / Math.sqrt(x2 * x2 + y2 * y2);
            double modelspeed = player.getSpeedBalance() * player.getSendSpeed();
            force += Math.min(10.0, Math.max(prod / 100.0, -10.0)) / factor / Math.sqrt(modelspeed);
        }
    }