title: how to validate a timestamp in java?
body: <p>I have a time variable</p>
  
  <pre><code>long time = (new Date()).getTime();
  </code></pre>
  
  <p>how would i perform a if statement on this? for example</p>
  
  <pre><code>if (time is over 5 minute)
      system.out.println("time is up")
  else
     system.out.println("OK TIME")
  </code></pre>
  
  <p>Im looking to test the time to see that if it has been a minute since the variable was initialised then perform an if statement if the time has been over a certain amount.</p>