private void updateWaitTimes(double timestep) {
        if (this.timeSinceRTL != -1) {
            this.timeSinceRTL += timestep;
        }
        for (Message m: sentMessageDuration.keySet()) {
            double time = sentMessageDuration.get(m);
            sentMessageDuration.put(m, time + timestep);
        }
        this.timeSinceHeartbeat += timestep;
        if(this.children.size() > 0) {
            this.timeToHeartbeat -= timestep;
        }
        if ((this.parent == -1) && (this.hasService == false)) {
            this.timeWithoutConnection += timestep;
        }
    }