// set max_frames to 1 for 5 seconds then move up to 200 public void run() { pg.si("frames", 1); try { Thread.sleep(5000); } catch (Exception e) { e.printStackTrace(); } for (int i = 1; i <= 100; i++) { pg.si("frames", 2 * i); try { Thread.sleep(10); } catch (Exception e) { e.printStackTrace(); } } }