title: Keeping track of time in Java
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1041675/java-timer">Java Timer</a>  </p>
  </blockquote>
  
  
  
  <p>How can I keep track of the remaining time in a fixed period of time in Java?</p>
  
  <p>For instance, I want to display this output each second to the user:</p>
  
  <pre><code>you have 50 seconds
  you have 49 seconds //after 1 second
  you have 48 seconds //after 2 seconds
  </code></pre>
  
  <p>And so on.</p>