title: Run code for x seconds in Java?
body: <p>I'd like to write a java while loop that will iterate for 15 seconds. One way I thought to do this would be to store the current system time + 15sec and then compare that to the current time in the while loop signature.</p>
  
  <p>Is there a better way?</p>