title: how do i add a number to an integer every second
body: <p>I'm making a cookie clicker sort of game and I want a thing where every second a certain number let's say 5 is added to another number. So every second the integer variable is going up by 5. How would I create a sort of time measuring method where it measures time so I can add a number to another number.</p>
  
  <pre><code>public class timeTesting {
      // I've put this method here for someone to create
      // a timer thing
      void timer()
      {
  
      }
      public static void main(String[] args) {        
          // Original number
          int number = 1;
          // Number I want added on to the original number every 5 seconds
          int addedNumber = 5;
      }
  }
  </code></pre>