public void incrementTime() {
        // Visit all places tokens and check whether they have timestamp>0 and less than globalclock
        // assign the global clock to the mimnimum found
        long minTime = 999999999;
        ArrayList places = Global.petriNet.getPlaces();
        for (int i = 0; i < places.size(); i++) {
            Place place = (Place) places.get(i);
            TokenSet tokenList = place.getTokens();
            if (tokenList.size() > 0) {
                for (int j = 0; j < tokenList.size(); j++) {
                    Token token = (Token) tokenList.get(j);
                    if (token.getTimestamp() != 0 && token.getTimestamp() < minTime) {
                        minTime = token.getTimestamp();
                    }
                }
            }
        }
        if (minTime != 999999999) {
            this.time = minTime;
        }
        this.gui.getTxtClock().setText(String.valueOf(this.time));
    }