title: Java how to increment an int 1 every second until it gets to 15
body: <p>I'd like to know how i can add 1 to my int every second until it reaches a certain number in this case 15.</p>
  
  <p>But i would only want the int to start increasing once i have pressed a button.</p>
  
  <pre><code>        @Override
          public void touchUp(InputEvent event, float x, float y,
                  int pointer, int button) {
              login.addAction(Actions.moveTo(0, 310, 1));
  
              loginClicked = true;
  
              if(loginClicked == true &amp;&amp; loginTimer == 15){
                  login.addAction(Actions.moveTo(0, 430, 1));
              }
          }
      });
  </code></pre>
  
  <p>There is my code as you can see i am making something move then after 15 seconds if it remains untouched i want it too move back.</p>