@Override
    public void simpleUpdate(float tpf) {
//        if (nbFrames == 4000) {
//            startTime = System.nanoTime();
//        }
//        if (nbFrames > 4000) {
//            time = System.nanoTime();
//            float average = ((float) time - (float) startTime) / ((float) nbFrames - 4000f);
//            helloText.setText("Average = " + average);
//        }
//        nbFrames++;
    }
Switch mode with space bar at run time
jme3-examples/src/main/java/jme3test/light/TestManyLightsSingle.java